mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
chore: Force content-disposition attachment when using local file storage
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user