From b66a83c10fd6350b5f0e665a8e24a8a4ecefeaaa Mon Sep 17 00:00:00 2001 From: zty Date: Thu, 16 Mar 2023 13:05:07 +0800 Subject: [PATCH] fix: upload component preview .webp image (#2631) Co-authored-by: tianyuan233 --- src/components/Upload/src/helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Upload/src/helper.ts b/src/components/Upload/src/helper.ts index a0c574b7a..7e8494e90 100644 --- a/src/components/Upload/src/helper.ts +++ b/src/components/Upload/src/helper.ts @@ -11,7 +11,7 @@ export function checkImgType(file: File) { } export function isImgTypeByName(name: string) { - return /\.(jpg|jpeg|png|gif)$/i.test(name); + return /\.(jpg|jpeg|png|gif|webp)$/i.test(name); } export function getBase64WithFile(file: File) {