mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: enhanced pdf support
This commit is contained in:
1 parent
ead0d54a55
commit
a3fb2cbd47
4 files changed
+5
-4
No files matched your search
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user