adonis-selectel-drive
v1.0.13
Published
Selectel cloudStorage driver for Adonis drive
Downloads
3
Readme
Selectel CloudStorage drive for AdonisJS
Requirements
- AdonisJS Drive (
adonis install @adonisjs/drive
)
Installation
adonis install adonis-selectel-drive
Instructions
Make sure to register the provider inside start/app.js
file.
const providers = [
...
'adonis-selectel-drive/providers/DriveProvider'
]
Add new configuration inside disks
module in config/drive.js
:
selectel: {
driver: 'selectel',
login: Env.get('SELECTEL_LOGIN'),
password: Env.get('SELECTEL_PASSWORD'),
container: Env.get('SELECTEL_CONTAINER'),
container_url: Env.get('SELECTEL_CONTAINER_URL')
}
Add selectel variables in .env
:
SELECTEL_LOGIN=
SELECTEL_PASSWORD=
SELECTEL_CONTAINER=
SELECTEL_CONTAINER_URL=
Examples
Find if a file exists or not.
const isExists = await Drive.disk('selectel').exists('adonis.jpeg')
Thanks
Special thanks to the creator(s) of AdonisJS for creating such a great framework.
This is a boilerplate for creating AdonisJs Addons. It is suggested to read addons guide to learn more about the development process.
Dependencies
This project includes following dependencies, you are free to remove them.
- japa - Test runner to run tests
- standardjs - Code linter