pdfjs跨域問題

  • 2019 年 12 月 5 日
  • 筆記

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

// 跨域問題注釋掉解決  if (origin !== viewerOrigin && protocol !== 'blob:') {       //throw new Error('file origin does not match viewer's');  }