cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

400 error when uploading file through REST API?

Daniel G.70 New member | Level 1
New member | Level 1

Recently the dropbox api has been giving me 404 errors when uploading a file. Same code has been working for months. Has anything changed? I'm accessing the rest api through sharpbox.

Error response is below. Part of the request I'm making is below that.

Response:

HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 28 Mar 2016 13:20:40 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Dropbox-Request-Id: ed356744df5e9541856f727505cceee0
X-Robots-Tag: noindex, nofollow, noimageindex

2e
{"error": {"file": "Expecting a file upload"}}
0

 

Reqeust:

POST https://api-content.dropbox.com/1/files/dropbox/VMDVGZION?file=test.pdf&oauth_consumer_key=0o1pqhuy0... HTTP/1.1
Content-Type: multipart/form-data; boundary=-----------------------------28947758029299
Host: api-content.dropbox.com
Content-Length: 292539

-------------------------------28947758029299
Content-Disposition: form-data; name="file"; filename="test.pdf";
Content-Type: application/octet-stream

%PDF-1.4 %âãÏÓ

..

-------------------------------28947758029299--

6 Replies 6

Re: 400 error when uploading file through REST API?

Daniel G.70 New member | Level 1
New member | Level 1

Looks like it's related to this post as well.  Can we get confirmation that this is going to be fixed or do I really need to use a new upload method?

https://www.dropboxforum.com/hc/en-us/community/posts/205203023-Upload-failing-on-iOS9-3-Expecting-a...

Re: 400 error when uploading file through REST API?

Dropboxer
Dropboxer

[Cross-linking for reference: https://stackoverflow.com/questions/36264051/dropbox-rest-api-404-error-when-uploading-file ]

Hi Daniel, thanks for the report! That's correct, this seems to be the same issue as reported in that other thread. The team is investigating, but I don't have a timeline for a fix to offer right now.

Re: 400 error when uploading file through REST API?

Dropboxer
Dropboxer

The /files (POST) endpoint should be working again now. Please let me know if you're still seeing any issues.

Re: 400 error when uploading file through REST API?

Prolog Q. New member | Level 1
New member | Level 1

Just FYI - this issue was affecting our Dropbox integration since Saturday. Thanks for resolving. We'll continue to look into using files_put instead.

Re: 400 error when uploading file through REST API?

MapQuest New member | Level 1
New member | Level 1

How and where do I get the official information links on disability of Dropbox ?

Re: 400 error when uploading file through REST API?

Dropboxer
Dropboxer

MapQuest, I'm not sure I understand your question. In any case, this thread was about a specific issue with the Dropbox API that has since been resolved. If you have a question about the Dropbox API, please feel free to open a new thread with the details: 

https://www.dropboxforum.com/hc/en-us/community/posts/new?community_post%5Btopic_id%5D=200209245

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?