Closed cmb69 closed 6 years ago
The algorithm to calculate the file size in KB appears to be wrong, since >> 8 is basically division by 256, but division by 1024 (i.e. >> 10) is desired. See also https://www.cmsimpleforum.com/viewtopic.php?f=10&t=13964&p=67246#p67246.
>> 8
>> 10
Probably better: change this line to
(round(filesize($downloads_path . '/' . $p) / 1024, 1)) .
The algorithm to calculate the file size in KB appears to be wrong, since
>> 8
is basically division by 256, but division by 1024 (i.e.>> 10
) is desired. See also https://www.cmsimpleforum.com/viewtopic.php?f=10&t=13964&p=67246#p67246.