I have a small project, I would like to write a program to unzip the ZIP files and display(extract) the files. Do you have a code that can do it? Here is my code that I try with the ZipFile object, but I encountered an error showing ZipFile is not defined.
Thank you
var doneReading = function(zip){
DoSomethingWithEntries(zip);
};
var zipFile = new ZipFile(url, doneReading);
function DoSomethingWithEntries(zip){
//for each entry in the zip...
for (var i=0; i<zip.entries.length; i++) {
var entry = zip.entries[i];
var entryInfo = "<h4><a>" + entry.name + "</a></h4>\n<div>";
//put that into a div, if you like.
//etc...
}
}
`