reg2005 / adonis-selectel-drive

Selectel cloudStorage driver for Adonis drive

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selectel CloudStorage drive for AdonisJS

Requirements

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.

  1. japa - Test runner to run tests
  2. standardjs - Code linter

About

Selectel cloudStorage driver for Adonis drive


Languages

Language:JavaScript 100.0%