I would like to download some a tampermonkey script that help me download images from a website and then packed as a zip file for me to download. I used JSZip for packing the images.
I have no problem following the sample code but when an image is added, then I would get the following error:
UnhandledPromiseRejectionWarning: Error: Invalid base64 input, it looks like a data url.
I placed my code in Runkit, if line 19 is commented (didn't add the downloaded image into the zip file) everything will run smoothly. I am not sure how could I could add the image into the zip file.
Thanks in advance
question from:
https://stackoverflow.com/questions/65929423/javascript-jszip-having-error-after-adding-image 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…