Hi,
thanks for this awesome lib. I have a problem though. When I try to compress a corrupted / invalid file, I never get any resolve or reject from compressFile's promise. I've looked though your code and the problem seems to be that you handle the onload event (image-compress.ts:118) on the Image object you use for the compression, but you don't handle onerror to reject the promise in case of invalid images.
Please add the .onerror callback containing a reject(error), so the app doesn't loop forever.
Hi, thanks for this awesome lib. I have a problem though. When I try to compress a corrupted / invalid file, I never get any resolve or reject from compressFile's promise. I've looked though your code and the problem seems to be that you handle the onload event (image-compress.ts:118) on the Image object you use for the compression, but you don't handle onerror to reject the promise in case of invalid images.
Please add the .onerror callback containing a reject(error), so the app doesn't loop forever.
Thanks!