blockstack-large-storage

0.0.6 • Public • Published

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

/blockstack-large-storage/

    Package Sidebar

    Install

    npm i blockstack-large-storage

    Weekly Downloads

    1

    Version

    0.0.6

    License

    MIT

    Unpacked Size

    5.97 MB

    Total Files

    14

    Last publish

    Collaborators

    • alvesjtiago