How to calculate the percentage of the downloaded file?

I need to calculate the percentage of file upload to the server. I read it as

Loaded percent = 100 / file size * Loaded bytes.

Does anyone know how we can get the following from the properties of a file upload control:

  • Uploaded file size
  • Loaded Bytes

Please, help. Thank you.

+5
source share
3 answers

"Does anyone know how we can get the following from the file download control properties"

If, as you said in the comments, you use standard .NET file upload controls, then you only get a server-side message when the file is fully downloaded.

: , .

, , , , , , HTTP-.

(, ) http://www.codeproject.com/Articles/14832/ASP-NET-file-post-direct-to-disk-with-upload-file

: % : /

+4

HTML 4 , , , HTML5 XMLHttpRequest, XMLHttpRequest2. upload XMLHttpRequest, , onprogress, onload .. : http://www.html5rocks.com/en/tutorials/file/xhr2/

XMLHttpRequest 2 : http://caniuse.com/xhr2

+1

All Articles