Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).on('finish', function() {
var f = new AV.File(pubFileName, {
// 仅上传第一个文件(多个文件循环创建)
base64: base64data[0]
});
try {
f.save().then(function(fileObj) {
// 向客户端返回数据
res.send({
fileId: fileObj.id,
mimeType: fileObj.metaData().mime_type,
name: fileObj.name(),
url: fileObj.url()
});
});
} catch (err) {
console.log('uploadFile - ' + err);
res.status(502);