Commit b66a83c10fd6350b5f0e665a8e24a8a4ecefeaaa
Committed by
GitHub
1 parent
7bbb8624
fix: upload component preview .webp image (#2631)
Co-authored-by: tianyuan233 <zty.dev@outlook.com>
Showing
1 changed file
with
1 additions
and
1 deletions
src/components/Upload/src/helper.ts
@@ -11,7 +11,7 @@ export function checkImgType(file: File) { | @@ -11,7 +11,7 @@ export function checkImgType(file: File) { | ||
11 | } | 11 | } |
12 | 12 | ||
13 | export function isImgTypeByName(name: string) { | 13 | export function isImgTypeByName(name: string) { |
14 | - return /\.(jpg|jpeg|png|gif)$/i.test(name); | 14 | + return /\.(jpg|jpeg|png|gif|webp)$/i.test(name); |
15 | } | 15 | } |
16 | 16 | ||
17 | export function getBase64WithFile(file: File) { | 17 | export function getBase64WithFile(file: File) { |