How to implement jszip in react.js
问题 I am trying to zip a list of files before sending out through the http request. But I got stuck here. export default function zipTargetFiles(files) { if (files.length <= 1) { return files; } else { const zip = require('jszip')(); for (let i = 0; i < files.length; i++) { zip.file(files[i].name, files[i]); } return zip.generateAsync({type:"blob"}); } } Basically, the function takes in a list of files and tries to zip them into one single .zip file. But when i send it out as formed data, it gave