错误如下 uploadFile:fail Error: form-data: ENOENT: no such
源码如下,请各位大神指导一下,为啥上传不成功
var that = this
wx.chooseImage({
count: 9,
success: function(res) {
var tempFilePath = res.tempFilePaths[0]
wx.saveFile({
tempFilePath: tempFilePath,
success: function(res) {
console.log(tempFilePath);
wx.uploadFile({
url: ‘https://www.xxx.com/Post1’,
filePath: tempFilePath,
name: ‘file’,
success: function(res){
console.log(‘success’);
//console.log(res.data);
//var data = res.data
//do something
},
fail:function(res){
console.log(res);
}
})
}
})
}
})