use this function instead:
function formatFileSize(bytes: number, si?: boolean, dp?: number) Copy
function formatFileSize(bytes: number, si?: boolean, dp?: number)
Format bytes as human-readable text.
Number of bytes.
True to use metric (SI) units, aka powers of 1000. False to use binary (IEC), aka powers of 1024.
Number of decimal places to display.
https://stackoverflow.com/users/65387/mpen
https://stackoverflow.com/a/14919494
Deprecated
use this function instead: