1.0.6 • Published 6 years ago

@edenjs/b2 v1.0.6

Weekly downloads
-
License
-
Repository
-
Last release
6 years ago

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
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago