wx.uploadFile 上传图片路径结果res.Data为空
之前坐过一个页面是有数据的,但现在怎么做提交data都是空的
wx.uploadFile({
url: ‘这个路径是对的’,
filePath: myimg[0],
name: ‘flie’,
method: “POST”,
header: { ‘Content-Type’: ‘multipart/form-data’, ‘Authorization’: token },
success: function (res) {
console.log(res)
},fail:function(){
console.log(“错误”)
}
})
错误提示为:
{statusCode: 200, data: “{“status”:200,“data”:[ ],“rel”:true}”, errMsg: “uploadFile:ok”}