You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
AdamHoover
6 days agoNew member | Level 1
libcurl upload
I'm trying to upload a file using libcurl. The code reports an OK upload, but the file does not appear. This is the equivalent curl command and it works: curl -X POST https://content.dropboxapi.co...
Greg-DB
5 days agoDropbox Staff
The 404 is from Dropbox and indicates that the request has not successfully reached a Dropbox API endpoint.
The issue is that you're sending a PUT, but you need to use POST to hit /2/files/upload. Please update your code to use POST and try again.
- AdamHoover5 days agoNew member | Level 1
That worked, thanks. For future readers, libcurl defaults to PUT on CURLOPT_UPLOAD, and Dropbox requires POST. If you follow either libcurl's API description (https://curl.se/libcurl/c/CURLOPT_UPLOAD.html) or example (https://curl.se/libcurl/c/fileupload.html), you must insert this line after setting CURLOPT_UPLOAD:
curl_easy_setopt(curl, CURLOPT_POST, 1L);
The CURLOPT_UPLOAD option will reset it back to PUT if you don't order it this way.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!