One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
ums
6 years agoNew member | Level 2
Drobox upload
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"
- 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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 22 minutes ago
If 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!