How to read a file This page explains how to read an existing zip file or add a existing file into the zip file. In the browser AJAX request Getting binary data with an ajax request is hard (mainly because of IE <= 9). The easy way is to use JSZipUtils.getBinaryContent . With JSZipUtils.getBinaryContent, you can do the following (see the documentation for more examples) : JSZipUtils.getBinaryContent('path/to/content.zip', function(err, data) { if(err) { throw err; // or handle err } var zip = new JSZip(data); }); If you need to adapt an existing solution to what getBinaryContent does,
Read full article from How to read a file
No comments:
Post a Comment