packages/components/eui-file-upload/pipes/filesize.pipe.ts
A pipe that transforms a file size in bytes into a human-readable format (e.g., KB, MB, GB).
Example :{{ 1024 | filesize }} // Outputs: "1.00 KB"
{{ 1048576 | filesize:1 }} // Outputs: "1.0 MB"| Name | filesize |
| transform | |||||||||||||||
transform(bytes: number, precision: number)
|
|||||||||||||||
|
Method used to format a size.
Parameters :
Returns :
string
String with formated size and unit. |