filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 76 forks source link

Upload SVG creating a endless spinner when resizing is enabled #449

Open owagner24 opened 3 years ago

owagner24 commented 3 years ago

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