var xls = json2xls(data);
var bufferdata = new Buffer(xls).toString('base64');
console.log("inside upload s3 function........", data);
//var buf = new Buffer(data, 'base64');
var uploaddata = {
Key: "exception.xls",
Body: bufferdata,
ContentEncoding: 'base64',
ContentType: 'application/vnd.ms-excel'
};
我能够通过 s3 保存和检索文件。但是格式不匹配即将出现。请帮助我解决这个问题。