lundi 29 juin 2009
pecl:uploadprogress
Dans la rubrique PHP / PEAR
uploadprogress est un package PECL en gestation. stable depuis le 15 mars 2009 mais sans documentation
La dernière version à dater de cet article est la 1.01 : uploadprogress-1.0.1.tgz (8.3kB)
Vous pouvez tester ca ici
Voici un exemple d'info qu'on reçoit "pendant" l'upload
Date : 2009-06-23T13:45:20+02:00
ID : eb68198b81ae7c656cfc0588a23ae3dd
var_dump($info):
array(11) {
["upload_id"]=> string(32) "eb68198b81ae7c656cfc0588a23ae3dd"
["fieldname"]=> string(4) "file"
["filename"]=> string(12) "Anniversaire"
["time_start"]=> string(10) "1245757519"
["time_last"]=> string(10) "1245757520"
["speed_average"]=> string(5) "36130"
["speed_last"]=> string(5) "30874"
["bytes_uploaded"]=> string(5) "36130"
["bytes_total"]=> string(6) "155082"
["files_uploaded"]=> string(1) "0"
["est_sec"]=> string(1) "3"
}
la demo affiche pendant l'envoi
Download started since 22.791 seconds. 51% done, 20 seconds to go
et à la fin
Upload succeeded, it took 42.255 seconds. You had 32 updates from the progress meter, looks like it's working fine
J'ai extrait les exemples


-
-





