Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/posquit0/node-giga
📦 Easy streaming upload and download for File System, AWS S3
https://github.com/posquit0/node-giga
aws aws-s3 download file filesystem nodejs s3 stream streaming upload
Last synced: 6 days ago
JSON representation
📦 Easy streaming upload and download for File System, AWS S3
- Host: GitHub
- URL: https://github.com/posquit0/node-giga
- Owner: posquit0
- License: mit
- Created: 2017-09-12T17:41:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T18:25:02.000Z (over 4 years ago)
- Last Synced: 2024-11-01T09:43:54.666Z (13 days ago)
- Topics: aws, aws-s3, download, file, filesystem, nodejs, s3, stream, streaming, upload
- Language: JavaScript
- Homepage:
- Size: 249 KB
- Stars: 27
- Watchers: 5
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Giga
Storage-agnostic streaming upload/download in Node.js
**Giga** is an abstract storage class to easily streaming upload and download files to Local File System, AWS S3, and more.
- It was written for use on [**OMNIOUS**](http://www.omnious.com) which provides fashion A.I API service.
## Installation
```bash
# NPM
$ npm install --save giga
# Yarn
$ yarn add giga
```## Usage
```node
const fs = require('fs');
const Giga = require('giga');
const S3Storage = require('giga/storages/S3Storage');
const LocalStorage = require('giga/storages/LocalStorage');const storage = new Giga({
storage: new S3Storage({
region: 'ap-northeast-2',
bucket: 'test'
})
});// Upload file to S3
const { filePath } = await storage.upload(fs.createReadStream('./my-file'));// Download file from S3
const { filePath } = await storage.download(
'hello-world.txt',
fs.createWriteStream('./my-file')
);
```## Contributing
This project follows the [**Contributor Covenant**](http://contributor-covenant.org/version/1/4/) Code of Conduct.
#### Bug Reports & Feature Requests
Please use the [issue tracker](https://github.com/posquit0/node-giga/issues) to report any bugs or ask feature requests.
## Contact
If you have any questions, feel free to join me at [`#posquit0` on Freenode](irc://irc.freenode.net/posquit0) and ask away. Click [here](https://kiwiirc.com/client/irc.freenode.net/posquit0) to connect.
## License
[MIT](https://github.com/posquit0/node-giga/blob/master/LICENSE) © [Byungjin Park](http://www.posquit0.com)