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,"---")
}
})
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
不要进行域名验证
看看这个 https://developers.weixin.qq.com/community/develop/doc/00068e1838c2e0551ba83a9875d800?_at=1626840971739