I have a file on device locally. I want to upload this file to Dropbox. Almost all is done, but I cannot figure out what should be the value of the contents
property of the object? I am using cordova file plugin
to get the file url and Dropbox SDK for uploading. Here's the code. Lets say i want to upload an MP3 or a ZIP file...
let dbx = new Dropbox({ clientId: CLIENT_ID })
dbx.filesUpload({
path: "/" + fileName,
contents: XXXXXXXX, // what should be the value of this?
mode: "overwrite",
mute: true,
autorename: false,
strict_conflict: false
})
.then(response => {
// do something with success
})
.catch(error => {
// do something with error
})