vue-core-image-upload icon indicating copy to clipboard operation
vue-core-image-upload copied to clipboard

后台接到上传的文件,但返回不了数据,求指点

Open 531431988 opened this issue 8 years ago • 4 comments

:8888/#/authen/person-authen:1 XMLHttpRequest cannot load http://192.168.10.85:8080/file/upload?token=otu_62ef7659017d12bdf4ac2cc5aa9d2a41. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://127.0.0.1:8888' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. xhr.js?cabd:1 SyntaxError: Unexpected end of JSON input at JSON.parse () at XMLHttpRequest.p.onerror (eval at (index.js:1814), :1:1742)

531431988 avatar May 24 '17 09:05 531431988

关于关于的问题,可以参考php的实现 Code,重点是控制header头的返回。

JackPu avatar May 24 '17 09:05 JackPu

我返回的,这个有问题吗?求大牛指点 qq 20170524174348

531431988 avatar May 24 '17 09:05 531431988

image 设置为当前的domain吧

JackPu avatar Jun 01 '17 09:06 JackPu

我这边也是Access-Control-Allow-Origin: *,控制台中能返回图片上传成功的在线路径,但是imageUploded中的res缺是undefined,另外两个报错如图 image

peewee922 avatar Nov 27 '18 03:11 peewee922