Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

上传预览图片突然报错Tainted canvases may not be exported #3186

Open
tsbanmeng opened this issue Feb 11, 2022 · 0 comments
Open

上传预览图片突然报错Tainted canvases may not be exported #3186

tsbanmeng opened this issue Feb 11, 2022 · 0 comments

Comments

@tsbanmeng
Copy link

报错内容 : Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported
上传时,不能预览图片了.服务器就在本地,上传目录也是本地.
一直以来都正常的,突然就报错了,我还以为代码出问题了.下载了DEMO测试.还是报错.一番查询.认为和跨域方面有关
在chrome中chrome://flags/#block-insecure-private-network-requests 禁用掉.重启浏览器后,上传恢复正常..
奇怪的是 chrome中这个设置随后我又恢复成默认.现在网站上传依然正常...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant