fix: Upload image type support heic & heif (#37651)

support apple image format: heic, heif
This commit is contained in:
Johnny-young 2022-09-23 10:44:55 +08:00 committed by GitHub
parent e8959e52cd
commit 944f69c6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ export const isImageUrl = (file: UploadFile): boolean => {
const extension = extname(url);
if (
/^data:image\//.test(url) ||
/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)
/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(extension)
) {
return true;
}