[fix] .wav .flac ファイルを再生可能にする (#10686)

* .wav .flac ファイルを再生可能にする
file-typeにより判定されたMIME TypeをHTML5 Audio/Video要素に認識されるものに書き換える

* fix typecheck error

* frontend側の FILE_TYPE_BROWSERSAFEも更新

* Update packages/backend/src/core/FileInfoService.ts

* ✌️

* 後方互換を確保

* add tests

* update changelog.md

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
Yuriha 2023-04-26 02:17:58 +09:00 committed by GitHub
parent 2aa75f5489
commit a986203b38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 292 additions and 160 deletions

View file

@ -454,7 +454,8 @@ export class FileServerService {
fileRole: 'original',
file,
filename: file.name,
mime: file.type,
// 古いファイルは修正前のmimeを持っているのでできるだけ修正してあげる
mime: this.fileInfoService.fixMime(file.type),
ext: null,
path,
};