1.2.5 • Published 2 years ago

@ryanforever/dropbox v1.2.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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)