0.0.6 • Published 5 years ago

blockstack-large-storage v0.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

blockstack-large-storage Build Status

Blockstack's Gaia storage only allows writing files up to 5MB. Therefore, this package adds the ability to write and get blockstack files larger than 5MB while maintaining direct compatibility for smaller files.

Larger files are chunked into several smaller ones and a referrence is kept on the original file pointing to each of them. When reading the file, it is put back together and returned as an array buffer via promise.

Instalation

$ npm install blockstack-large-storage --save

Usage

Complete compatibility with blockstack's storage API. The putFile method is here called writeFile and the getFile method is readFile.

import { writeFile, readFile } from "blockstack-large-storage";
readFile(path: String, options: Object): Promise
writeFile(path: String, content: (String | Buffer), options: Object): Promise

Testing

npm run test
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago