Use inline content disposition for common images and PDFs (#6924)

* Use inline content disposition for common images and PDFs

* Add double-click on widgets to download
This commit is contained in:
Tom Moor authored and GitHub committed 2024-05-18 09:17:04 -07:00
1 parent c872f3e245
commit cd4f3f9ff2
5 files changed
+51 -7

No files matched your search

+3 -1
View File
@@ -94,7 +94,9 @@ router.get(
ctx.set("Cache-Control", cacheHeader);
ctx.set("Content-Type", attachment.contentType);
ctx.attachment(attachment.name);
ctx.attachment(attachment.name, {
type: FileStorage.getContentDisposition(attachment.contentType),
});
ctx.body = attachment.stream;
}
}