wx.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
camera: 'back',
success(res) {
console.log('res', res);
wx.getFileSystemManager().readFile({
filePath: res.tempFiles[0].tempFilePath, //选择图片返回的相对路径
encoding: 'binary', //编码格式
success: async res => { //成功的回调
console.log('getFileSystemManager文件流', res)
let resss = await uploadImage(res.data)
console.log('uploadImage', resss);
}
})
}
})
上传文件时 需要 binary 文件流 拿着这个res.data 就报错了 500
- {code: 500, message: "Current request is not a multipart request"}
- code: 500
- message: "Current request is not a multipart request"
这个是什么情况呢