core: enhanced pdf support

This commit is contained in:
undefined committed 2021-12-22 20:18:25 +08:00
1 parent ead0d54a55
commit a3fb2cbd47
4 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -628,7 +628,7 @@ export class ProblemFileDownloadHandler extends ProblemDetailHandler {
this.response.etag = file.etag;
this.response.body = await storage.get(target);
this.response.type = file['Content-Type'] || fileType;
this.response.disposition = `attachment; filename=${encodeURIComponent(filename)}`;
if (!noDisposition) this.response.disposition = `attachment; filename=${encodeURIComponent(filename)}`;
} else {
this.response.redirect = await storage.signDownloadLink(
target, noDisposition ? undefined : filename, false, 'user',