试用exif.js引入本地图片报了一个错,这是跨域的错?本地为什么涉及到跨域。。

exif.js:380 XMLHttpRequest cannot load file:///C:/Users/pjy/Desktop/exif-js/exif-js-master/example/dsc_09827.jpg. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

阅读 2.3k
2 个回答

requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https

看到没有,里面没有file:

anywhere了解一下?
使用相对路径吧然后开anywhere来进行开发

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题