Cross-origin image load from cross-enabled site is denied

后端 未结 2 505
臣服心动
臣服心动 2021-01-24 17:51

I\'m trying to use CORS enabled image which is located on cors-enabled site: dropbox.com.
I\'ve got an error: cross-origin image load denied by CORS policy.

2条回答
  •  清酒与你
    2021-01-24 18:04

    The page you're linking to isn't CORS-enabled, but you don't actually want to download that page (which is HTML) anyway. You want the image that is displayed there. A direct link to that file is CORS-enabled: https://dl.dropboxusercontent.com/s/54an0126onoxezj/stone1.png.

    The way to convert a share link to a direct link is to change the domain from www.dropbox.com to dl.dropboxusercontent.com. See https://www.dropbox.com/developers/blog/53/programmatically-download-content-from-share-links.

提交回复
热议问题