wx.uploadFile中的url是什么?后端接口吗?
https://developers.weixin.qq.com/miniprogram/dev/api/network/upload/wx.uploadFile.html
wx.chooseImage({
success (res) {
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: 'https://example.weixin.qq.com/upload', //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
name: 'file',
formData: {
'user': 'test'
},
success (res){
const data = res.data
//do something
}
})
}
})