If thing.Size <1024 Then
str= thing.Size & " Bytes"
ElseIf thing.Size < 1048576 Then
str= Round(thing.Size / 1024.1) & " KB"
Else
str= Round((thing.Size/1024)/1024.1) & " MB"
End If
str= thing.Size & " Bytes"
ElseIf thing.Size < 1048576 Then
str= Round(thing.Size / 1024.1) & " KB"
Else
str= Round((thing.Size/1024)/1024.1) & " MB"
End If
function Get_File_Size($filesize) {
if($filesize < 1024){
$filesize = (string)$filesize . " Bytes";
}else if($filesize < (1024 * 1024)){
$filesize = number_format((double)($filesize / 1024), 1) . " KB";
}else if($filesize < (1024 * 1024 * 1024)){
$filesize = number_format((double)($filesize / (1024 * 1024)), 1) . " MB";
}else{
$filesize = number_format((double)($filesize / (1024 * 1024 * 1024)), 1) . " GB";
}
return $filesize;
}