调用uploadFile报错,求各位大神看下什么原因。。
wx.chooseImage({ success: function (res) { var tempFilePaths = res.tempFilePaths wx.uploadFile({ url: 'https://example.weixin.qq.com/upload', //仅为示例,非真实的接口地址 filePath: tempFilePaths[0], name: encodeURI('file'), formData: { }, success: function (res) { var data = res.data //do something } }) } }) |