Merge branch 'dev' into feature/tags

This commit is contained in:
Cohee
2023-06-28 22:57:53 +03:00
committed by GitHub
10 changed files with 182 additions and 145 deletions

View File

@@ -4025,7 +4025,7 @@ async function downloadChubCharacter(id) {
}
const buffer = await result.buffer();
const fileName = result.headers.get('content-disposition').split('filename=')[1];
const fileName = result.headers.get('content-disposition')?.split('filename=')[1] || `${sanitize(id)}.png`;
const fileType = result.headers.get('content-type');
return { buffer, fileName, fileType };