@ryanforever/dropbox

1.2.5 • Public • Published

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)

/@ryanforever/dropbox/

    Package Sidebar

    Install

    npm i @ryanforever/dropbox

    Weekly Downloads

    3

    Version

    1.2.5

    License

    ISC

    Unpacked Size

    13.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • ryanforever