Compare commits

...

1 Commits

Author SHA1 Message Date
Tom Moor 45d145a698 chore: Force content-disposition attachment when using local file storage 2025-08-13 21:45:14 -04:00
+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;