Split bulk downloads into file type and cache output

This commit is contained in:
Alex Cabal 2022-07-09 17:22:13 -05:00
parent 55985b0c2f
commit 12b79b5dcd
11 changed files with 395 additions and 178 deletions

View file

@ -51,16 +51,16 @@ class Formatter{
$output = number_format(round($bytes / 1048576, 1), 1) . 'M';
}
elseif($bytes >= 1024){
$output = number_format($bytes / 1024, 2) . 'KB';
$output = number_format($bytes / 1024, 0) . 'KB';
}
elseif($bytes > 1){
$output = $bytes . ' bytes';
$output = $bytes . 'b';
}
elseif($bytes == 1){
$output = $bytes . ' byte';
$output = $bytes . 'b';
}
else{
$output = '0 bytes';
$output = '0b';
}
return $output;