@ryanforever/dropbox
v1.2.5
Published
dropbox API
Downloads
1
Readme
dropbox
a simple dropbox API interface
This can only access files/folders in it's own "app folder" in the /Apps
directory in dropbox.
ex. if the app is called image-downloader
, the folder will appear at /Apps/image-downloader
usage
const Dropbox = require("rf-dropbox")
const dropbox = new Dropbox({
token: process.env.DROPBOX_TOKEN
})
dropbox.getFiles("files").then(files => {
console.log(files)
dropbox.getLink(files[0].path_lower).then(console.log)
})
// upload file from a URL
dropbox.uploadUrl(image, "/folder")
// upload a buffer
dropbox.uploadBuffer(buffer, name)
// fetch an image from a url, and create a buffer ready to upload
dropbox.createBuffer(url)
// dropbox.getAuthorizationLink()
// dropbox.uploadBuffer(buffer, name)
// dropbox.getLink(filepath)
// dropbox.createShareLink(filepath, config = {})
// dropbox.uploadFile(filepath)