Reputation: 73
I am using jszip to create a zip file using javascript.And I want to zip a folder. I am using the following sample code to create zip file
var zip = new JSZip();
zip.file("Hello.txt", "Hello World\n");
var img = zip.folder("images");
img.file("smile.gif", imgData, {base64: true});
var content = zip.generate();
location.href="data:application/zip;base64,"+content;
Using the above code the download popup is coming. But I want to save that zip file in a particular location without browse. How I can implement that. Thanks in advance for answer
Upvotes: 0
Views: 2736
Reputation: 105
Just for the information, zip.generate() has been removed in jsZip 3.0
Upvotes: 1
Reputation: 4807
You can not save zip or any other file at particular position using javascript or other scripts without browser, it's security violation, so as per my knowledge you can not do that at list by javascript.
Upvotes: 0