我的用户可以将大量文件上传到aws,因为我必须显示上传进度条。但是axios在上传时显示总价值。我不知道为什么这会在上传时显示总价值到AwsS3
const config = {
onUploadProgress:function (progressEvt) {
console.log(progressEvt.loaded)//Showing total value while uploading
}
}
export function uploadtoCdnAndSaveToDb(data) {
return dispatch => {
dispatch(showUnderLoader(true));
return axios.post('/posttodb',{data:data},config
).then(response => {
console.log(response.data)
})
}
}