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

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

@tsbanmeng

Description

@tsbanmeng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions