Skip to content

alvesjtiago/blockstack-large-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Add ability to write and get blockstack files larger than 5MB while maintaining direct compatibility for smaller files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published