docker部署后,附件上传失败,有报错
xgxshtc opened this issue · comments
Error: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL at a.th (http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:432026) at a.post (http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:435395) at a.upload (http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:434557) at http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:434450 at Array.forEach () at a.uploadFiles (http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:434400) at a.handleChange (http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:434158) at re (http://order.xxxx.tech/static/web/js/chunk-libs.3497728e.js:11:11674) at HTMLInputElement.n (http://order.xxxx.tech/static/web/js/chunk-libs.3497728e.js:11:13494) at Qi.o._wrapper (http://order.xxxx.tech/static/web/js/chunk-libs.3497728e.js:11:52151)
大概找到原因了,http://order.xxxx.tech/static/web/js/chunk-elementUI.297346c4.js:1:432026js 文件里,i=e.action,不知道为什么取到的值是定值http://ipadress:port/api/v1/public/uploadFile, 而不是域名,由于不太懂前端代码,不会继续排查了,暂时写死为真实的域名成功了。期待后续有大佬解答。
遇到了同样的问题,大佬能指导下如何修改代码嘛