SVGs without width and height show "uploading" indefinitely in Firefox/IE 11
srt4rulez opened this issue · comments
Describe the bug
If an SVG has no width and height attributes, filepond shows "uploading" indefinitely. Once you do this, the filepond instance cannot upload any other files.
Logs
None.
To Reproduce
https://codesandbox.io/s/vanilla-filepond-forked-4gizr
-
Download the codesandbox zip
-
Upload the "carrot.svg" from the static folder.
-
The SVG renders correctly, and then successfully "uploads".
-
Upload the "carrot_no_width_height.svg"
-
Filepond shows "Uploading" indefinitely.
-
Cancel the upload.
-
Attempt to upload the original "carrot.svg" again.
-
The SVG renders correctly, but Filepond shows "Uploading" indefinitely again.
Expected behavior
I expect that if an SVG has no width or height, there is no image preview, but it still uploads correctly, and allows me to upload files after cancelling.
Stacktraces
None.
Information about your project:
- Your browser and the version: Firefox 83.0 (64-bit), Firefox Developer 84.0b4 (64-bit), IE 11 (11.508.19041.0)
- Your operating system: Windows 10
- FilePond version: 4.13.6
Additional context
After writing out this template, I found it this only happens in Firefox and IE 11. Chrome 87.0.4280.66 (64-bit) and Microsoft Edge Version 87.0.664.47 (64-bit) showed a preview of the SVG and uploaded it successfully.
Also, this only happens with the image preview plugin. If you remove it, the SVG uploads successfully.
@rikschennink Any ideas here? I'd like to help out if possible 😁
Very much appreciated.
I think this Firefox bug report is related: https://bugzilla.mozilla.org/show_bug.cgi?id=1328124