filestack-js icon indicating copy to clipboard operation
filestack-js copied to clipboard

Upload SVG creating a endless spinner when resizing is enabled

Open owagner24 opened this issue 4 years ago • 0 comments

I have a setup which allows the upload for images and I have enabled image resizing by defining a imageDim in the picker options:

const apikey = "YOUR_APIKEY";
const client = filestack.init(apikey);

client
      .picker({
        accept: [
          "image/*",
        ],
        imageDim: [180, 180],
        onUploadDone: (files) => {
          console.log("files", files);
        },
      })
      .open();
  });

Expected Behavior

I can upload a SVG without problems.

Current Behavior

When upload a SVG a endless spinner occurs and there is a JavaScript error in the console:

picker.js:1 Uncaught (in promise) TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
    at picker.js:1

Possible Solution

Steps to Reproduce (for bugs)

  1. Open the fiddle https://jsfiddle.net/mvw70beu/2/
  2. Upload a SVG file

Additional Screenshots

  1. Bildschirmfoto 2021-07-21 um 06 51 14

Context

Your Environment

  • Version used: 3.x.x
  • Browser Name and version: Chrome 90.0.4430.212 (Offizieller Build) (x86_64)
  • Operating System and version (desktop or mobile): Mac OSX 11.3
  • Link to your project:

owagner24 avatar Jul 21 '21 04:07 owagner24