ダウンロードURLにdownloadを付けないなど (#5488)
This commit is contained in:
parent
2671c6b4f2
commit
d17c6adba4
3 changed files with 4 additions and 7 deletions
|
@ -46,9 +46,7 @@ export default async function(ctx: Koa.BaseContext) {
|
|||
ctx.set('Content-Disposition', contentDisposition('inline', `${rename(file.name, { suffix: '-web' })}`));
|
||||
ctx.body = InternalStorage.read(key);
|
||||
} else {
|
||||
if ('download' in ctx.query) {
|
||||
ctx.set('Content-Disposition', contentDisposition('attachment', `${file.name}`));
|
||||
}
|
||||
ctx.set('Content-Disposition', contentDisposition('inline', `${file.name}`));
|
||||
|
||||
const readable = InternalStorage.read(file.accessKey!);
|
||||
readable.on('error', commonReadableHandlerGenerator(ctx));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue