@davvo/drbx

2.1.0 • Public • Published

drbx

Dropbox upload and download streams

##Install

$ npm install @davvo/drbx --save

##Examples

const fs = require('fs')

const drbx = require('@davvo/drbx')({
  token: '<dropbox-access-token>'
})

// Download
let remoteReadStream = drbx.file('/giraffe.jpg').createReadStream()
let localWriteStream = fs.createWriteStream('/photos/zoo/giraffe.jpg')
remoteReadStream.pipe(localWriteStream)

// Upload
let localReadStream = fs.createReadStream('/photos/zoo/zebra.jpg')
let remoteWriteStream = drbx.file('/zebra.jpg').createWriteStream()
localReadStream.pipe(remoteWriteStream)

Readme

Keywords

Package Sidebar

Install

npm i @davvo/drbx

Weekly Downloads

0

Version

2.1.0

License

ISC

Last publish

Collaborators

  • davvo