diff --git a/components/upload/__tests__/upload.test.js b/components/upload/__tests__/upload.test.js index 6f9bc0361d..eb71925a1f 100644 --- a/components/upload/__tests__/upload.test.js +++ b/components/upload/__tests__/upload.test.js @@ -188,7 +188,7 @@ describe('Upload', () => { }); }); - it('should increase percent automaticly when call autoUpdateProgress in IE', done => { + it('should increase percent automatically when call autoUpdateProgress in IE', done => { let uploadInstance; let lastPercent = -1; const props = { diff --git a/components/upload/utils.tsx b/components/upload/utils.tsx index fda980c966..7cead75727 100644 --- a/components/upload/utils.tsx +++ b/components/upload/utils.tsx @@ -73,7 +73,10 @@ export const isImageUrl = (file: UploadFile): boolean => { } const url: string = (file.thumbUrl || file.url) as string; const extension = extname(url); - if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg)$/i.test(extension)) { + if ( + /^data:image\//.test(url) || + /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension) + ) { return true; } if (/^data:/.test(url)) {