Do you have an idea for Dropbox Paper? Share it with us here!

Drobox upload

ums New member | Level 2
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

Re: Drobox upload


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.

API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post