You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

anas saifi's avatar
anas saifi
Explorer | Level 3
11 months ago

Re: Dropbox chooser integrated with a react webapp not working when opened in chrome ios mobile, ipa

hey I am also using react-dropbox-chooser, when I select an image I get it's meta data such as thumbnail link, link, bytes etc. Now I need to send the blob of this file to the server but when I fetch the blob using the link that I got in the response I get CORS error.
Since you are working on the same thing so can you please help me out ?

 


  • anas saifi wrote:

    ..., while creating an app on dropbox it asks for domain name but I am running my application on local host. ...


    It doesn't ask for, but you need it for your Chooser. In such a case your domain is just localhost. 😉

    Good luck.

  • anas saifi I've moved your post to its own thread, as the original thread did not mention an issue with a CORS error.

     

    Please share the details of the issue, such as the steps/code to reproduce the issue, as well as the full error/output you're getting so we can take a look.

    • anas saifi's avatar
      anas saifi
      Explorer | Level 3

      I am using react-dropbox-chooser to integrate Dropbox in my application.

      Everything works fine, it allows me to sign in my account and it also displays my files, on choosing an image I get the following data about the image
      Image data

       

      Now I need to send the image to server for that I need to get the blob of the image, which I am doing in the following manner
      const response=fetch(link)
      const blob = await response.blob()
      but I am getting the following error

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        anas saifi As Здравко said, those "preview" shared links on www.dropbox.com point to a preview HTML page, not the file data itself, and do not support CORS.

         

        If you want to directly access the file data using CORS, you can use the "direct" link type (instead of "preview") when setting up the Chooser.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,888 PostsLatest Activity: 2 days ago
326 Following

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!