Skip to content Skip to sidebar Skip to footer

How To Get Progress When Uploading File Via Xmlhttprequest

I am wondering how to get the progress of a file upload using XMLHTTPRequest. In Firefox the onprogress method does not fire at all, and in chrome it only fires after the file has

Solution 1:

Try xhr.upload.onprogress. In the XMLHttpRequest2 spec XMLHttpRequest have upload attribute.

The ability to register for progress events. Both for downloads (put listeners on the XMLHttpRequest object itself) and uploads (put listeners on the XMLHttpRequestUpload object, returned by the upload attribute). http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#differences

Post a Comment for "How To Get Progress When Uploading File Via Xmlhttprequest"