pdfjs跨域问题

2019-12-05 18:31:14 浏览数 (1)

当使用外部域名时提示Uncaught (in promise) Error: file origin does not match viewer's…… 修改viewer.js

代码语言:javascript复制
// 跨域问题注释掉解决
if (origin !== viewerOrigin && protocol !== 'blob:') {
     //throw new Error('file origin does not match viewer's');
}

0 人点赞