wx.uploadfile调用失败socket hang up?
wx.chooseImage({
count: 1,
sizeType: [
'original',
'compressed'
],
sourceType: [
'camera'
],
success(res) {
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: "xxxxxxxxxxxxxxxxxxxx",
filePath:tempFilePaths[0],
name: 'filename',
method: 'post',
success: function (res) {
console.log(res);
},
fail: function (res) {
console.log("上传失败");
console.log(res);
}
})
},
fail(err){
console.log(err,"---")
}
})
[图片]