Adding Multiple Files into a Zip File not Working
问题 I'm using JSZip to add selected files into a single zip file. The issue is only the last selected file is being added to the zip (which is also corrupted), see code below: var zip = new JSZip(); var items = ''; var count = 0; var zipName = 'resources.zip'; $$('input[type=checkbox]').each(function(e){ if(e.checked){ if(e.id!='select-all'){ items = items + "'" + e.getAttribute('data-href') + "'|" + e.getAttribute('data-file') + ","; } } }); if(items!=''){ items = items.slice(0,-1) var tmp =