@edenjs/b2

1.0.6 • Public • Published

EdenJS - Backblaze B2

TravisCI Issues License Awesome Discord

Backblaze B2 base logic component for EdenJS

@edenjs/b2 automatically adds the Backblaze B2 asset transport to your EdenJS installation

Setup

Install

npm i --save @edenjs/b2

Configure

config.b2 = {
  id     : '', // backblaze id
  secret : '', // backblaze api key
  bucket : '', // backblaze bucket name
  domain : '', // (optional) cname or other domain that points to this bucket address
};

Example

// require model
const File = model('file');

// load file
const file = new File();

// await file creation
await file.fromFile('/local/file/location.pdf');

// save file
await file.save(); // this is now stored in backblaze

// get url for file
const url = await file.url(); // returns full url to download the file

Readme

Keywords

none

Package Sidebar

Install

npm i @edenjs/b2

Weekly Downloads

7

Version

1.0.6

License

none

Unpacked Size

8.39 kB

Total Files

9

Last publish

Collaborators

  • edencoder
  • ewhal
  • installgen2