diff --git a/app/helpers.php b/app/helpers.php index f01632ce3..8a22ecfb6 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -4,11 +4,11 @@ function formatBits(int $bits, $precision = 2) { if ($bits > 0) { - $i = floor(log($bits) / log(1024)); + $i = floor(log($bits) / log(1000)); $sizes = ['B', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb']; - return sprintf('%.02F', round($bits / pow(1024, $i), $precision)) * 1 .' '.@$sizes[$i]; + return sprintf('%.02F', round($bits / pow(1000, $i), $precision)) * 1 .' '.@$sizes[$i]; } return 0;