[improvement] Uploader: support more image types (#4140)
This commit is contained in:
@@ -6,6 +6,10 @@ test('isImageFile', () => {
|
||||
expect(isImageFile({ url: 'https://a.png' })).toBeTruthy();
|
||||
expect(isImageFile({ url: 'https://a.svg' })).toBeTruthy();
|
||||
expect(isImageFile({ url: 'https://a.gif' })).toBeTruthy();
|
||||
expect(isImageFile({ url: 'https://a.webp' })).toBeTruthy();
|
||||
expect(isImageFile({ url: 'https://a.jfif' })).toBeTruthy();
|
||||
expect(isImageFile({ url: 'https://a.bmp' })).toBeTruthy();
|
||||
expect(isImageFile({ url: 'https://a.dpg' })).toBeTruthy();
|
||||
expect(isImageFile({ file: { type: 'image/jpg' } })).toBeTruthy();
|
||||
expect(isImageFile({ file: { type: 'application/pdf' } })).toBeFalsy();
|
||||
expect(isImageFile({ content: 'data:image/xxx' })).toBeTruthy();
|
||||
|
||||
Reference in New Issue
Block a user