为什么上传云文件存储出现一个VM75998:1 Error: errCode: -1 | errMsg: cloud.uploadFile:fail uploadFile:fail createUploadTask:fail file not found; at cloud.uploadFile api; 地错误
upload:function(){
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
const tempFilePaths = res.tempFilePaths
wx.cloud.uploadFile({
cloudPath: 'example.png',
filePath: 'tempFilePaths[0]', // 文件路径
success: res => {
// get resource ID
console.log(res.fileID);
},
fail: err => {
console.error(err);
}
})
}
})
}