upload() {
wx.chooseImage({
count: 1,
success: chooseRes => {
const tempFilePaths = chooseRes.tempFilePaths
console.log(tempFilePaths);
wx.uploadFile({
url: 'https://example.com/upload_image?a=1',
filePath: tempFilePaths[0],
name: 'file',
success: console.log,
fail: console.log
})
}
});
}
只有query没有formData
对呀,看不到传输的formdata,阉割了郁闷
楼主解决了吗? 找到问题了吗?