We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

iambvttercvp's avatar
iambvttercvp
Explorer | Level 3
8 years ago

Dropbox v2 API Content-Type header

For confirmation:

 

Is it allowed to use Content-Type header other than "application/octet-stream" and "text/plain; charset=dropbox-cors-hack" when uploading file using Dropbox v2 API (https://content.dropboxapi.com/2/files/upload)?

 

I have tried using other Content-Type value (example: multipart_form_data) but an error is always returned.

 

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

 

5 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago
    No, the API only accepts the Content-Type values mentioned as expected in the error message.
  • iambvttercvp's avatar
    iambvttercvp
    Explorer | Level 3
    8 years ago
    Does Dropbox v2 have any specification regarding this?
  • iambvttercvp's avatar
    iambvttercvp
    Explorer | Level 3
    8 years ago

    Specification regarding the Content-Type value for uploading files using Dropbox v2 API.

    That only these Content-Type values can be used.

    "application/octet-stream", "text/plain; charset=dropbox-cors-hack"

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago
    I don't believe that's called out specifically in the documentation, but that information from the error message is correct. (It's also shown in the curl examples.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,037 PostsLatest Activity: 8 hours ago
412 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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!