Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/algab/storage-files-js
Package Storage Files JS
https://github.com/algab/storage-files-js
nodejs npm-package
Last synced: 5 days ago
JSON representation
Package Storage Files JS
- Host: GitHub
- URL: https://github.com/algab/storage-files-js
- Owner: algab
- Created: 2018-08-17T23:09:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-22T21:55:26.000Z (almost 5 years ago)
- Last Synced: 2024-10-31T13:37:26.743Z (17 days ago)
- Topics: nodejs, npm-package
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Package Storage Files JS
Package JavaScript for uploading, reading and deleting [Storage Files](https://github.com/algab/storage-files) applications objects.
## Step 1
Install the package.
```
npm install storage-files-js
```## Step 2
Use the package.
#### Create instance
##### Attributes:
1 - host (required)
2 - nameBucket (required)
3 - token (required)```
const storageFiles = require('storage-files-js');
const storage = storageFiles('http://localhost:3001/v1','teste','1234');
```#### INSERT
##### Attributes:
1 - request (required)
2 - nameFolder```
storage.insert(req)
.then(data => {})
.catch(err => {});
```#### INFO
##### Attributes:
1 - nameObject (required)
2 - nameFolder```
storage.info('teste.jpg')
.then(data => {})
.catch(err => {});
```#### REMOVE
##### Attributes:
1 - nameObject (required)
2 - nameFolder```
storage.remove('teste.jpg')
.then(data => {})
.catch(err => {});
```