question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to monitor the 'progress' of the upload?

See original GitHub issue

use 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:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
wmertenscommented, Dec 3, 2015

@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…

1reaction
domeniccommented, Sep 20, 2015
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found