I need to use the JSZip library or its JSZip-utils variant to compress files (in my case external via URL), but the strange thing is that no matter how much the library, use the example code in my project as well as in pages jsfiddle type, it does not work since it never throws the message for download. It must be said that the original code of the page has 2 lines where the compression of image or files is set which in my example remove them and only leave the line that creates a TXT that is the simplest thing out there, just to see if it worked with the simplest but still does not work.
var zip = new JSZip();
zip.file("Hello.txt", "Hello World\n"); //Crea archivo Hello con frase Hello world.
var img = zip.folder("images"); //seteo de carpeta de imagenes
img.file("smile.gif", imgData, {base64: true}); //compresion de archivos de imagen.
zip.generateAsync({type:"blob"})
.then(function(content) {
// see FileSaver.js
saveAs(content, "example.zip");
});
In the project I put some alerts to see where the function went and although it goes through the final compression, it does not open the download popup
Could someone help me because the message is not generated for the download?
Thank you very much !!