Textpattern CMS Template Tags

<txp:file_download_size /> single tag, 2 attributes


The file_download_size tag is a single tag which Textpattern will replace with the formated file size of the file to be downloaded. Should be used in a download form.


  • The way to represent the number, based on the file’s expected size.
  • Valid options are b (bytes), kb (kilobytes), mb (megabytes), gb (gigabytes), tb (terabytes), or pb (petabytes).
  • Number of decimal places to format the value to.
<txp:file_download_size /> 1 examples

Display formatted file size in kilobytes

<txp:file_download_size format="kb" decimals="2" />