Browse Source

fix: upload component preview .webp image (#2631)

Co-authored-by: tianyuan233 <zty.dev@outlook.com>
pull/2637/head
zty 4 years ago
committed by GitHub
parent
commit
b66a83c10f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/Upload/src/helper.ts

2
src/components/Upload/src/helper.ts

@ -11,7 +11,7 @@ export function checkImgType(file: File) {
} }
export function isImgTypeByName(name: string) { 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) { export function getBase64WithFile(file: File) {

Loading…
Cancel
Save