dfa1234/ngx-image-compress

I got the RangeError when I choose 0 size file

Closed this issue · 2 comments

Hello,
First of all, I appreciate your implementing this.
When I choose 0 size file on a selection dialog for the image, I got the RangeError as below.
image
Do you have any idea about it?
Thank you for your answer in advance.

Thank a lot to report some bug.

But I didn't succeed to reproduce.

What do you mean "When I choose 0 size file on a selection dialog for the image"?

Feel free to fork our repo on stackblitz, save it, and and submit it here. I will take you just a couple of second.

@fluttercid I finally figured what you mean.

Indeed if you try to upload a totally empty file of 0 bytes, it will throws this error.

Thank for finding this interesting edge case 👍