pqina / filepond-plugin-image-preview

🖼 Show a preview for images dropped on FilePond

Home Page:https://pqina.nl/filepond

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Download the codesandbox zip

  2. Upload the "carrot.svg" from the static folder.

  3. The SVG renders correctly, and then successfully "uploads".

  4. Upload the "carrot_no_width_height.svg"

  5. Filepond shows "Uploading" indefinitely.

  6. Cancel the upload.

  7. Attempt to upload the original "carrot.svg" again.

  8. 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 😁

commented

Very much appreciated.

I think this Firefox bug report is related: https://bugzilla.mozilla.org/show_bug.cgi?id=1328124