chore: Force content-disposition attachment when using local file storage

This commit is contained in:
Tom Moor
2025-08-13 21:45:14 -04:00
parent 119eb92f27
commit 45d145a698
+2 -1
View File
@@ -73,7 +73,8 @@ router.get(
async (ctx: APIContext<T.FilesGetReq>) => {
const actor = ctx.state.auth.user;
const key = getKeyFromContext(ctx);
const forceDownload = !!ctx.input.query.download;
const forceDownload =
!!ctx.input.query.download || env.FILE_STORAGE === "local";
const isSignedRequest = !!ctx.input.query.sig;
const { isPublicBucket, fileName } = AttachmentHelper.parseKey(key);
const skipAuthorize = isPublicBucket || isSignedRequest;