Skip to content
Advertisement

First arg must be a Blob object or a File object. Image compressor

I am making an image compressor. In the image you see a simple design with a dragon drop to fill in ur files. But i want to download the image i keep getting one error (displayed below).

[This is what i got so far.][1] [1]: https://i.stack.imgur.com/2RJ3v.png

This is my download funtion but when i press the button to download i keep getting 1 error

JavaScript

Error:

conversion.js:1 Uncaught (in promise) Error: compressAccurately(): First arg must be a Blob object or a File object.

I tried a lot of things but i can’t really figure it out. Someone got any idea how to solve this?

Advertisement

Answer

I figured it out. I had to add an Array and make the file excisable for all functions.

JavaScript
Advertisement