微信开发工具使用uploadFile上传文件的时候,formData里为什么没有东西?
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