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

meganrm's avatar
meganrm
New member | Level 2
2 years ago

CORs error on forced download links

I am trying to request an obj file from a publicly shared link. 

 

The link is "https://www.dropbox.com/scl/fi/xh3vmyt9d74cl5cbhqgpm/Antigen.obj?rlkey=b4zcediso03wiuc96w3agm6rg&dl=1"

Which successfully downloads if you go directly to it, but when I try to load it in my site, I get this error: 

`Access to fetch at 'https://www.dropbox.com/scl/fi/xh3vmyt9d74cl5cbhqgpm/Antigen.obj?rlkey=b4zcediso03wiuc96w3agm6rg&dl=1' from origin 'https://simularium.allencell.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.`

 

I am using the THREE.js OBJLoader 

 

This workflow used to work for us. Has something changed? 

 

 

  • yes so what ended up working for me was: 

    `url = url.replace("www.dropbox.com", "dl.dropboxusercontent.com");`
    with a url that has `dl=1` and a `rlkey` as parameters. 
    thanks! 
  • Jay's avatar
    Jay
    Icon for Dropbox Staff rankDropbox Staff

    Hi meganrm, thanks for bringing this to our attention.

     

    Have you been using the new style of shared links for this method, or the old style?

     

    This will help me to assist further!

    • meganrm's avatar
      meganrm
      New member | Level 2

      It's a very recently generated link, so I assume the "new style", I also put the link in my message so you should be able to see the format. 

       

      -Megan 

       

    • Jay's avatar
      Jay
      Icon for Dropbox Staff rankDropbox Staff

      Could you try the suggestions in this thread to see if they help by changing the URL of the file?

      • meganrm's avatar
        meganrm
        New member | Level 2

        yes so what ended up working for me was: 

        `url = url.replace("www.dropbox.com", "dl.dropboxusercontent.com");`
        with a url that has `dl=1` and a `rlkey` as parameters. 
        thanks! 

About Create, upload, and share

Find help to solve issues with creating, uploading, and sharing files and folders in Dropbox. Get support and advice from the Dropbox Community.

Need more support

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!