HTML_Progress2 : The Definitive Guide |
We will find at least two scripts: one, on final step, to manage temporary file upload
This chunk of code is found on examples/ajax/upload/apc5_upload1.php
of the package
distribution.
The second script will manage the polling loop iteration. Here we used
an HTML_AJAX auto server.
Example apc5_upload1.php
used the basic
HTML_Progress2_Upload::getStatus()
method. This one return an array with four key-value pairs
(percentage
, labels
, bytes_uploaded
,
bytes_total
).
And you will ask: How to display other informations like percentage, filename, estimate time left and speed limit ?
You did it with progress bar labels and a format list. These formats are :
HTML_Progress2_Upload default behavior is to display an uplStatus label formatted as : "%C / %T (%P%)" on top left of progress bar.
Note | |
---|---|
If you want to see this label information, don't forget to add it on HTML_Progress2 design.
|
HTML_Progress2 : The Definitive Guide | v 2.4.0 : April 20, 2007 |