cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to hear from you. What do you use Dropbox for?
Close

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: 
Highlighted

Drobox upload

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 1
Highlighted

Re: Drobox upload

Dropboxer
Dropboxer

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.

Polls
Do you know how to organize your files and folders?
<b>We have created a guide on folder best practice, so you can get organized now <a href="https://www.dropboxforum.com/t5/Business-Tips-tricks/Folder-structure-best-practice/m-p/428456#M39"><u>check it out here</u></a>.</b>

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?