wx.uploadFile用来将本地文件上传到服务器
微信小程序客户端会发起一个HTTPS的post请求,其中content-type为multipart/form-data
wx.uploadFile的参数
wx.uploadFile({url: 'https://example.weixin.qq.com/upload', // 仅为示例,非真实的接口地址filePath: tempFilePath,name: 'file',formData: {user: 'test'},success(res) {const data = res.data// do something}})
