cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

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.

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

CORs error on forced download links

CORs error on forced download links

meganrm
New member | Level 2
Go to solution

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=...

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=...' 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? 

 

 

1 Accepted Solution

Accepted Solutions

meganrm
New member | Level 2
Go to solution

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! 

View solution in original post

6 Replies 6

Jay
Dropbox Staff
Go to solution

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!


Jay
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

meganrm
New member | Level 2
Go to solution

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
Dropbox Staff
Go to solution

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


Jay
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

meganrm
New member | Level 2
Go to solution

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! 

Walter
Dropbox Staff
Go to solution

We're glad to hear it's sorted now and thanks for keeping us in the loop too @meganrm 

 

See you around the Community and take care!


Walter
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join

meganrm
New member | Level 2
Go to solution

Thank you! It said in that post about the `dl.` links: "These are link transformations from the early days of Dropbox.  While we don't "officially" list these anymore in our Help Center, we are continuing to support them for now. " 

 

Are there plans to address the CORS issue with the standard share links so that using the `dl.dropboxusercontent.com` will no longer be necessary?

 Thanks

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    meganrm New member | Level 2
  • User avatar
    Walter Dropbox Staff
  • User avatar
    Jay Dropbox Staff
What do Dropbox user levels mean?