I’m trying to develop a html-5 uploader with progress bar.
I’ve accomplished sending and receiving the file, but the progress bar remains.
All the examples uses something like:
var xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", function (evt) { ...
When I type this in my browser console it responds with undefined
var xhr = new XMLHttpRequest(); alert(xhr.upload);
How do I get the hand of the upload object so I can track progress?
I’ve tested in latest Chrome (v16) and Firefox (v9)
Try to just set the
onprogressdirectly.and then do what you were doing.
It should work, just creating a new xhr in the console, upload is there. Something else is going on in your code.