diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2019-07-05 17:44:23 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-05 17:44:23 +0900 |
| commit | 26f2ae093bcb2e9eba703e9f865c264beb04dc99 (patch) | |
| tree | be89131a8f1617a249e73f561ef52f217ba8dcb3 /src/server/file | |
| parent | ハッシュタグのトレンドの計算を5分単位で丸める (#5107) (diff) | |
| download | sharkey-26f2ae093bcb2e9eba703e9f865c264beb04dc99.tar.gz sharkey-26f2ae093bcb2e9eba703e9f865c264beb04dc99.tar.bz2 sharkey-26f2ae093bcb2e9eba703e9f865c264beb04dc99.zip | |
APNGでもMIME typeはimage/pngにするように (#5100)
* APNGでもMIME typeはimage/pngにするように
* Revert "APNGでもMIME typeはimage/pngにするように"
This reverts commit e579eb2bf44f526cabfa9bd4adc6b4fa84727e3b.
* APNGはファイル送信時のみimage/pngにするように
Diffstat (limited to 'src/server/file')
| -rw-r--r-- | src/server/file/send-drive-file.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/file/send-drive-file.ts b/src/server/file/send-drive-file.ts index 5da3d79eb5..44e88be8ae 100644 --- a/src/server/file/send-drive-file.ts +++ b/src/server/file/send-drive-file.ts @@ -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 { |