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上保存和检索文件。但是出现了格式不匹配的问题。请帮助我解决这个问题。