Forum Discussion

jasskcet's avatar
jasskcet
Explorer | Level 3
8 years ago
Solved

Eroor 400 when using the Dropbox choose API

Hi,

I am trying to consume the Dropbox choose API as from the below link:

https://www.dropbox.com/developers/chooser

However, when the chooser window is shown, it ends up with error 400.

 

Kindly advise on what went wrong. 

  • We do not currently include the MIME type in the response from metadata returned by the Chooser.  I have filed this as a feature request for the Chooser.

    In cases where the returned file name includes a file extension, is it possible to infer the MIME type from the file extension?

15 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    The Chooser doesn't offer a way to retrieve a blob, but you can download it directly using a GET request, as you mentioned and linked to.

    Exactly how you do so is up to you, depending on what tools you have available. For example, you may want to use the jQuery get method, or just a XMLHttpRequest. 

    You don't need to supply anything extra to access the returned direct link.

  • jasskcet's avatar
    jasskcet
    Explorer | Level 3
    8 years ago

    Greg, Thanks. I am able to successfully retrieve the data. However, when the file is selected, as a part of the metadata of the file that is returned(id, name, link etc), I would also need mime type of the document I selected. Is there a way to get this?. Kindly let me know. 

    Samad

  • DBX_Robert's avatar
    DBX_Robert
    Icon for Dropbox Staff rankDropbox Staff
    8 years ago

    We do not currently include the MIME type in the response from metadata returned by the Chooser.  I have filed this as a feature request for the Chooser.

    In cases where the returned file name includes a file extension, is it possible to infer the MIME type from the file extension?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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, Facebook or Instagram.

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!