ofd和tiff下载跨域文件接口修改

This commit is contained in:
陈精华
2022-12-13 17:50:28 +08:00
parent 167189d4e4
commit 3dcd183171
2 changed files with 2 additions and 13 deletions

View File

@@ -15,7 +15,7 @@
var url = '${currentUrl}';
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}ofd/index.html?file="+ encodeURIComponent(url)+"";
document.getElementsByTagName('iframe')[0].height = document.documentElement.clientHeight - 10;