Converts a number of bytes to the equivalent in KB, MB, etc.
<div> File Size: {{ sizeInBytes | adfFileSize:"2" }} </div>
The pipe chooses the largest unit that is less than the total number of bytes and divides the total by this number. This ensures that the number of units is greater than 1 (eg, you will see "512 Bytes" rather than "0.5KB"). The pipe parameter indicates the number of decimal places to use for the value, defaulting to 2 decimal places.
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.