APNGでもMIME typeはimage/pngにするように (#5100)
* APNGでもMIME typeはimage/pngにするように * Revert "APNGでもMIME typeはimage/pngにするように" This reverts commit e579eb2bf44f526cabfa9bd4adc6b4fa84727e3b. * APNGはファイル送信時のみimage/pngにするように
This commit is contained in:
parent
6a53ccf814
commit
26f2ae093b
3 changed files with 4 additions and 2 deletions
|
@ -42,7 +42,7 @@ export default async function(ctx: Koa.BaseContext) {
|
|||
ctx.set('Content-Disposition', contentDisposition('inline', `${rename(file.name, { suffix: '-thumb', extname: '.jpeg' })}`));
|
||||
ctx.body = InternalStorage.read(key);
|
||||
} else if (isWebpublic) {
|
||||
ctx.set('Content-Type', file.type);
|
||||
ctx.set('Content-Type', file.type === 'image/apng' ? 'image/png' : file.type);
|
||||
ctx.set('Content-Disposition', contentDisposition('inline', `${rename(file.name, { suffix: '-web' })}`));
|
||||
ctx.body = InternalStorage.read(key);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue