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
2024-05-18 12:17:04 -04:00
committed by GitHub
parent c872f3e245
commit cd4f3f9ff2
5 changed files with 51 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ export default class S3Storage extends BaseStorage {
["starts-with", "$Cache-Control", ""],
]),
Fields: {
"Content-Disposition": "attachment",
"Content-Disposition": this.getContentDisposition(contentType),
key,
acl,
},
@@ -114,7 +114,7 @@ export default class S3Storage extends BaseStorage {
Key: key,
ContentType: contentType,
ContentLength: contentLength,
ContentDisposition: "attachment",
ContentDisposition: this.getContentDisposition(contentType),
Body: body,
})
.promise();
@@ -145,7 +145,6 @@ export default class S3Storage extends BaseStorage {
Bucket: env.AWS_S3_UPLOAD_BUCKET_NAME,
Key: key,
Expires: expiresIn,
ResponseContentDisposition: "attachment",
};
const url = isDocker