Newscoop 3 Cookbook

File size formatting

The "camp_filesize_format" modifier formats an integer in Byte specific multiples:

{{ <integer>|camp_filesize_format:"<filesize_format>" }}

<filesize_format> may take one of the following values:

  • TB: for displaying the size in terabytes
  • GB: for displaying the size in gigabytes
  • MB: for displaying the size in megabytes
  • KB: for displaying the size in kilobytes
  • B: for displaying the size in bytes