修复getCorsFile接口未加base64编码(filter中解码异常)

This commit is contained in:
陈精华
2022-07-21 11:27:06 +08:00
parent acffcbfe98
commit dd65564af6
2 changed files with 8 additions and 2 deletions

View File

@ -25,7 +25,7 @@
var url = '${finalUrl}';
var baseUrl = '${baseUrl}'.endsWith('/') ? '${baseUrl}' : '${baseUrl}' + '/';
if (!url.startsWith(baseUrl)) {
url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(url);
url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(Base64.encode(url));
}
document.getElementsByTagName('iframe')[0].src = "${baseUrl}pdfjs/web/viewer.html?file=" + encodeURIComponent(url) + "&disablepresentationmode=${pdfPresentationModeDisable}&disableopenfile=${pdfOpenFileDisable}&disableprint=${pdfPrintDisable}&disabledownload=${pdfDownloadDisable}&disablebookmark=${pdfBookmarkDisable}";
document.getElementsByTagName('iframe')[0].height = document.documentElement.clientHeight - 10;
@ -52,4 +52,4 @@
initWaterMark();
}
</script>
</html>
</html>