mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Split bulk downloads into file type and cache output
This commit is contained in:
parent
55985b0c2f
commit
12b79b5dcd
11 changed files with 395 additions and 178 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue