Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Paul H.37
10 years agoNew member | Level 1
CORS does not seem to work for uploading files from the browser.
I'm attempting to upload files from the browser to a Dropbox folder on the user's account. The way I have it set up right now, OAuth2 is triggered using a link, which then redirects to the server whe...
Paul H.37
10 years agoNew member | Level 1
I'm not entirely sure how to properly format code on here, but here's the request bit (with the irrelevant success and error functions stripped).
$.ajax({
url: "https://api-content.dropbox.com/1/files_put/auto/Apps/The Worm/" + file.name,
headers: {
Authorization: 'Bearer ' + dropbox_token,
contentLength: file.size
},
crossDomain: true,
crossOrigin: true,
type: 'PUT',
contentType: file.type,
data: evt.target.result,
dataType: 'json',
processData: false
});
I had looked at the Javascript SDK, but it looks like you can't just put a token into the client to use, and I don't want to have to re-OAuth each time.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!