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: 

Drobox upload

Drobox upload

ums
New member | Level 2

Can i send stream object to dropbox upload api? or else can i send data in multipart format. because when i try to upload data by sending stream in body i get error {"code":404,"name":"ActionUncaughtException","body":{"name":"TypeError","message":"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object." } . Also when i try using multipart format i get following error. Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "multipart/form-data;". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack"

1 Reply 1

Greg-DB
Dropbox Staff

When uploading file data to the Dropbox API, such as via /2/files/upload, the file data should be supplied in the request body, with a Content-Type of "application/octet-stream"(or the CORS workaround as seen in the output you shared, if needed). The Dropbox API does not support "multipart/form-data" .

Exactly what HTTPS client you use, or where you get the file data, is up to you. For instance, if you're using an HTTPS client that allows you to stream in the file content for the call, that's fine as long as the client sends it up in the request body with a valid content type.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?