Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>[EDIT](Answer Changed)</p> <p>Temporary alternate way to do this is by JavaScript. Here's the code-</p> <pre><code>var readFile = function(){ $("#status").html("&lt;br/&gt;"); var url= $("#urlToLoad").val(); var doneReading = function(zip){ extractEntries(zip); }; var zipFile = new ZipFile(url, doneReading); }; // this function extracts the entries from an instantiated zip function extractEntries(zip){ $('#report').accordion('destroy'); // clear $("#report").html(''); var extractCb = function(id) { // this callback is invoked with the entry name, and entry text // in my demo, the text is just injected into an accordion panel. return (function(entryName, entryText){ var content = entryText.replace(new RegExp( "\\n", "g" ), "&lt;br/&gt;"); $("#"+id).html(content); $("#status").append("extract cb, entry(" + entryName + ") id(" + id + ")&lt;br/&gt;"); $('#report').accordion('destroy'); $('#report').accordion({collapsible:true, active:false}); }); } // for each entry in the zip, extract it. for (var i=0; i&lt;zip.entries.length; i++) { var entry = zip.entries[i]; var entryInfo = "&lt;h4&gt;&lt;a&gt;" + entry.name + "&lt;/a&gt;&lt;/h4&gt;\n&lt;div&gt;"; // contrive an id for the entry, make it unique var randomId = "id-"+ Math.floor((Math.random() * 1000000000)); entryInfo += "&lt;span class='inputDiv'&gt;&lt;h4&gt;Content:&lt;/h4&gt;&lt;span id='" + randomId + "'&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;\n"; // insert the info for one entry as the last child within the report div $("#report").append(entryInfo); // extract asynchronously entry.extract(extractCb(randomId)); } } </code></pre> <p>Attach this to Click event, also it may take time for large zip files. It works with node.js</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload