我对如何使用 axios 上传进度事件感到有些困惑。实际上我正在将大量文件存储到 aws s3 中。为此,如何获取上传进度?我需要这个功能onUploadProgress
目前我的 Post 请求是这样的:
export function uploadtoCdnAndSaveToDb(data) {
return dispatch => {
dispatch(showUnderLoader(true));
return axios.post('/posttodb', {data:data},
).then((response) => {
console.log(response.data)
})
}
}