How to monitor the 'progress' of the upload?
See original GitHub issueuse XMLHttpRequest, i listener ‘progress’, as below:
var XHR = new XMLHttpRequest();
XHR.upload.addEventListener("progress", function(e) {
if (e.lengthComputable) {
var percentComplete = Math.round(e.position * 100 / e.total);
console.log(percentComplete);
}
}, false);
How do this with fetch ?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Monitoring the Progress of an Upload - VMware
To monitor the progress of an upload, you can watch the bytesTransferred attribute of the file. Each File element in the template includes...
Read more >How do I monitor the progress of a file upload to a servlet?
This tutorial describes how to monitor the progress of a file upload to a servlet.
Read more >Monitor CSV Upload Progress In Real-Time - Totango Help
As a global admin, I am able to see the number of records count and upload time progress in real-time for uploads in...
Read more >Uploading files with progress monitoring in VanillaJS, Angular ...
So, in this post we will see how to upload files asynchronously with JavaScript with progress monitoring. Step 1: Our backend. Yes, we...
Read more >How to monitor the percentage progress of a file upload in ...
I am uploading files that take about 10 minutes. Is there any way to see the progress? (Note: I am not looking to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@domenic I don’t understand how to use that snippet to monitor upload progress - in the spec I can only see streams for the response object, not the request object…
This should do the trick: https://gist.github.com/domenic/95e689d0be5e24fb08ec