【发布时间】:2020-11-27 19:29:41
【问题描述】:
我目前正在使用 jszip 并压缩文件,但文件已损坏,因为我将其压缩为 zip 文件。 但后端只能解压缩 gzip 文件。 我在前端使用 vue js。
let zip = new jszip();
zip.file(fileToCompress.name, fileToCompress);
let component = this;
zip.generateAsync({type: "blob", compression: "DEFLATE"}).then(function(zipedFile) {
send to the back end
}
如何将其压缩为 gzip?有我可以使用的图书馆吗?或者我可以使用一些jszip如何?如果可以,我该怎么做?
【问题讨论】:
标签: javascript vue.js compression gzip