cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Access-Control-Allow-Origin

Access-Control-Allow-Origin

ajaybaglane
New member | Level 2

i'm using javascript fetch(url,

{
      method: 'GET',
      mode: 'cors'
      cache: 'no-cache'      
      credentials: 'same-origin'
      headers: myHeaders,
        referrer: 'no-referrer'  }

Error:-
Access to fetch at 'https://www.dropbox.com/s/v2pca6kq8nsqmso/abb5c48dae55560e4ae7d41af7bfdc50.jpg?raw=1' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: 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.

7 Replies 7

ajaybaglane
New member | Level 2

pls help me 

 

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://stackoverflow.com/questions/62718038/access-control-allow-origin-header-is-present-on-the-re... ]

 

I see you already posted this on StackOverflow and got a response there. That response is correct, Dropbox doesn't allow CORS requests on www.dropbox.com.

query for dreambox
Explorer | Level 4

I am facing this issue with file served from dropboxusercontent.com, is this supposed to happen?

Greg-DB
Dropbox Staff

@query for dreambox Unfortunately, using dropboxusercontent.com is not officially supported, so I can't offer help with that.

query for dreambox
Explorer | Level 4

What exactly is meant by not "officially supported", is Dropbox supposed to be used only for media content(e.g. images and video) storage but not static content(css JS and other files) because with no access-control-allow-origin all these file will be blocked by browsers ?

Greg-DB
Dropbox Staff

@query for dreambox Regardless of the file type, substituting in 'dropboxusercontent.com' in Dropbox shared links like this is not something that Dropbox documents and may break without notice, and we can't offer technical support for issues that occur when doing so.

Здравко
Legendary | Level 20

@Greg-DB wrote:

..., substituting in 'dropboxusercontent.com' in Dropbox shared links like this is not something that Dropbox documents and may break without notice, and we can't offer technical support for issues that occur when doing so.


Hm...🤔 Greg, you may need to inform your shared links product manager about that! Just take a look here. 🤷🤦 He may have no any idea that it's unsupported! 😁🤫 Would be nice the different Dropbox departments speak to each others and avoid such a confusions like is something supported or not. 😉

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    query for dreambox Explorer | Level 4
What do Dropbox user levels mean?