It seems blobs are not supported directly. Any suggestions on the most efficient conversion to perform before adding a blob to a zip?
(I've tried a FileReader() with readAsDataURL(blob) but it results in a corrupted file in the zip, and I'm also guessing this conversion may not be the most efficient).
FileReader.readAsArrayBuffer() seems to provide good results. So no issue for me any more.
I think it would be helpful to add an example on how to add a blob to a zip. Super useful tool!
JSZip v3.0.0 now supports blob as file content. zip.file("image.png", blob); will work.
Most helpful comment
JSZip v3.0.0 now supports blob as file content.
zip.file("image.png", blob);will work.