0.1.7 • Published 7 years ago

@deepvision/adventist-fsapi v0.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

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

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago