Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
HrcKuhar
5 years agoNew member | Level 2
Upload file using jquery
I'm trying to upload an image to dropbox using jquery, but I get an error for cors policy block. Is there another way to upload?
My code:
var xhr = new XMLHttpRequest();
xhr.upload.onpr...
Greg-DB
Dropbox Community Moderator
5 years agoFrom your code I see you're attempting to upload to a "shared link" (the "https://www.dropbox.com/sh/..." link). That only offers the ability to read the linked content though, not the ability to upload to it.
To programmatically upload a file, you can use the /2/files/upload Dropbox API endpoint. You can find information on using that in the documentation here.
About Discuss Dropbox Developer & API
Make connections with other developers
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!