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

JimRobinson's avatar
JimRobinson
Explorer | Level 4
3 years ago

CORS requests involving OPTIONS preflight failing from Firefox and Safari

We recently got an issue report that Dropbox had stopped workin in our app (https://igv.org/app) from Firefox and Safari.   The app is a genomics visualizer, we support loading genomics data from Dropbox.   The files are huge and most requests include a "range" header.   This triggers an OPTIONs request which is failing with a 404 not-found error, and no CORS headers in the response.  It is easy to reproduce with the following javascript from Firefox or Safari.   This request works from Chrome, its possible Chrome is not sending the OPTIONs request but that's a guess.   In any event OPTIONS is a valid method and this should not fail.    I do not know when this first occured, but it definitely worked in the past.

 

In the snippet below commenting out the "range" header results in a simple GET request which returns successfully.   The "range" header spawns an OPTIONS preflight, as it should, which fails.

 

fetch('https://dl.dropboxusercontent.com/s/zx7owfskn0jk6ab/heart_slc25a3.cram?dl=0', {
method: 'GET',
headers: {
range: 'bytes:1-1000'
}
}).then(x => x.blob().then(y => console.log(y)))

 

  • This should be fixed now. Thanks for the report!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 7 hours ago
325 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!