I'm currently creating React app now in which it should have progress percentage while sending the request.
I don't understand, it always logs directly one message which is 100% in my console even the request has not-yet-completed/pending.
Code in my axios:
onUploadProgress: (progressEvent) => {
const { loaded, total } = progressEvent;
let percent = Math.floor((loaded * 100) / total);
console.log(`percentage => ${percentage}`);
},
I expect to have like these output like in this youtube-tutorial

