我正在尝试将图像放入jszip中,但每次都会给我一个错误
这是我的jszip代码:
function button(res){
setTimeout(function(){
var zip = new JSZip();
var img = zip.folder("image");
var base64 = require('./base64');
var ZipEntries = require('./zipEntries');
module.exports = function(data, options) {
var files, zipEntries, i, input;
options = options || {};
if (options.base64) {
data = base64.decode(data);
}
}
zip.folder("images").file("facebook.png", base64Data, {base64: true});
base64zip = zip.generate();
zip.file('signature.html', res );
zip.generateAsync({type:"blob"})
.then(function(content) {
saveAs(content, "mailssignature.zip");
});
}, 2700);
};