Showing results for 
Show  only  | Search instead for 
Did you mean: 
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".

Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".

Explorer | Level 3

I am using MultipartEntityBuilder to create Entity in java. MultipartEntityBuilder needs boundary value to be set. but dropbox is not allowing it to send.


when i do that, i m getting below error.


Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "text/plain; boundary=dRUj2TWABj74JeYRtJ2MYFIjWDyjWrAaMQE". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".


could anyone please help ?

1 Reply 1

Re: Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-ha


The Dropbox API does not accept multipart requests, so you should not use MultipartEntityBuilder when constructing Dropbox API calls.

For information on what is expected for a call /2/files/upload, please refer to the documentation:

As linked there, that endpoint is a "content-upload" style endpoint: 

The data for the file you're uploading should be sent in the request body, with a "Content-Type" header or "application/octet-stream" of "text/plain; charset=dropbox-cors-hack". (The first one is preferred.)

If you're using Java though, we recommend using the official Java SDK, which will do most of the work for you:

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?