cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: 400 error when uploading file through REST API?

400 error when uploading file through REST API?

Daniel G.70
Explorer | Level 4

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

Daniel G.70
Explorer | Level 4

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...

Greg-DB
Dropbox Staff

[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.

Greg-DB
Dropbox Staff

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

Prolog Q.
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.

MapQuest
New member | Level 1

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

Greg-DB
Dropbox Staff

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

Need more support?