fix(backend/DriveService): convert WebP/AVIF to WebP (#10239)
* fix(backend/DriveService): convert transparent WebP/AVIF to PNG * webpにする その希望が複数ありましたので * Update packages/backend/src/core/DriveService.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * update test * webpはwebpublicにできる --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
parent
e0b7633a7a
commit
3f53cbd8f6
8 changed files with 86 additions and 42 deletions
|
@ -204,7 +204,12 @@ export const simpleGet = async (path: string, accept = '*/*'): Promise<{ status:
|
|||
redirect: 'manual',
|
||||
});
|
||||
|
||||
const body = res.headers.get('content-type') === 'application/json; charset=utf-8'
|
||||
const jsonTypes = [
|
||||
'application/json; charset=utf-8',
|
||||
'application/activity+json; charset=utf-8',
|
||||
];
|
||||
|
||||
const body = jsonTypes.includes(res.headers.get('content-type') ?? '')
|
||||
? await res.json()
|
||||
: null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue