pecl-php-uploadprogress icon indicating copy to clipboard operation
pecl-php-uploadprogress copied to clipboard

Incorrect size for large file

Open sandra2n opened this issue 3 years ago • 4 comments

Hello,

When I upload large file the returned bytes_total is incorrect and the returned bytes_uploaded go back to smaller size after a while.

Ex with a file of 6.59GB (7 087 108 096)

16:37:58 : Array ( [upload_id] => 632b213b89b79 [fieldname] => link[] [filename] => big_file.rar [time_start] => 1663770974 [time_last] => 1663771078 [speed_average] => 4294734946 [speed_last] => 40598789 [bytes_uploaded] => 4270802843 [bytes_total] => 2792138080 [files_uploaded] => 0 [est_sec] => 0 )

16:37:59 : Array ( [upload_id] => 632b213b89b79 [fieldname] => link[] [filename] => big_file.rar [time_start] => 1663770974 [time_last] => 1663771079 [speed_average] => 144183 [speed_last] => 39303682 [bytes_uploaded] => 15139229 [bytes_total] => 2792138080 [files_uploaded] => 0 [est_sec] => 19260 )

Do you know what to do to fix it, please?

Thank you

sandra2n avatar Sep 21 '22 15:09 sandra2n

Did e77cf26b55ae6f70a4ab9b24f9c684ff7a2ac938 fix this?

ryandesign avatar Dec 12 '22 09:12 ryandesign

Sorry, I don't know how to compile

sandra2n avatar Dec 13 '22 14:12 sandra2n

I'll try to release a version that contains the fix later this month.

ramsey avatar Dec 13 '22 17:12 ramsey

Same problem here - after 2GB the uploadprogressbar switches to 16EB - looks very much like an int overflow. An new version with the patch https://github.com/php/pecl-php-uploadprogress/commit/e77cf26b55ae6f70a4ab9b24f9c684ff7a2ac938 would be appreciated very much :-) (Tested on PHP 8.0.28)

meyerrob avatar Mar 02 '23 15:03 meyerrob