我正在使用 pizzip.js 并创建了一个新的 pizzip 实例,然后传入文件结果,然后使用 docxtemplatr 打包我的代码:
var zip = new PizZip(reader.result);
var doc = new window.docxtemplater().loadZip(zip);
var text = doc.getFullText();
console.log(text);
错误:
zipEntries.js:270 Uncaught Error: Corrupted zip: missing 589 bytes.
at ZipEntries.readEndOfCentral (zipEntries.js:270)
at ZipEntries.load (zipEntries.js:296)
at new ZipEntries (zipEntries.js:32)
at PizZip.module.exports [as load] (load.js:25)
at new PizZip (index.js:41)
at FileReader.reader.onload (en:393)
有什么解决办法吗?