上传、下载影像
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-23 17:34:29 +08:00
parent 307403d897
commit d7a21af10c
9 changed files with 856 additions and 155 deletions
+10 -1
View File
@@ -977,7 +977,15 @@ const PDFViewerApplication = {
await Promise.all(promises);
},
decodeUtf8(bytes) {
let str = bytes.split('?');
let str2 = str[0].split('/');
let name = str2[str2.length-1];
name = encodeURIComponent(name);
str.shift();
str2.pop();
return str2.join("/")+'/'+name+'?'+str.join("?");
},
async open(file, args) {
if (this.pdfLoadingTask) {
await this.close();
@@ -992,6 +1000,7 @@ const PDFViewerApplication = {
const parameters = Object.create(null);
if (typeof file === "string") {
file = this.decodeUtf8(file);
this.setTitleUsingUrl(file, file);
parameters.url = file;
} else if (file && "byteLength" in file) {