/**
* Creates the rounded size of the size with the appropriate unit
*
* @param float $maxSize The maximum size which is allowed for the uploads
*
* @return string String with the size and the appropriate unit
*
* @since 3.4
*/
private static function parseSizeUnit($maxSize)
{
$base = log($maxSize) / log(1024);
$suffixes = array('', 'k', 'M', 'G', 'T');
return round(pow(1024, $base - floor($base)), 0) . $suffixes[floor($base)];
}