@deepvision/adventist-fsapi

0.1.7 • Public • Published

File Storage API

Installing

To install library run:

bit import deep.api/_/file-storage

Initializing

For working using api library import to your script file and create instance with new. Notice, that endpoint argument is required in constructor.

import FSApi from '<path_to_library>';

const fsApi = new FSApi({
    endpoint: 'your-enpoint',
    token: 'your-token',
});

Usage

File Types

  • image.course.cover – обложка курса (оригинал)
  • image.course.cover.cropped – обложка курса

Actions

Upload file

Upload file to the server

fsApi.upload(fileType, file)
  • fileType – type of transferred file
  • file – the file

Upload Child file

Upload file to the server with dependency

fsApi.uploadChild(fileType, parentId, file)
  • fileType – type of transferred file
  • parentId – id of the parent file
  • file – the file

Get validation rules

Validation rules for file type

fsApi.validationRules(fileType)
  • fileType – type of transferred file

License

This project is licensed under the DeepVision License

Readme

Keywords

none

Package Sidebar

Install

npm i @deepvision/adventist-fsapi

Weekly Downloads

9

Version

0.1.7

License

ISC

Unpacked Size

11.6 kB

Total Files

8

Last publish

Collaborators

  • cerj
  • andrew.vlasiuk
  • deepbot
  • denys.shnurenko
  • ftornik
  • v.angolenko