Skip to content

loonkwil/filesize-extension-bundle

Repository files navigation

Filesize Extension

Build Status

Install

Symfony 4.x, 5.x

composer require "spe/filesize-extension-bundle" "~2.0.0"

Symfony 2.x, 3.x

composer require "spe/filesize-extension-bundle" "~1.0.0"

app/AppKernel.php:

$bundles = array(
    // ...
    new SPE\FilesizeExtensionBundle\SPEFilesizeExtensionBundle(),
    // ...
);

Usage

{{ file.size|readable_filesize }} {# 123.45 KB #}
{{ file.size|readable_filesize(0) }} {# 123 KB #}
{{ file.size|readable_filesize(0, '') }} {# 123KB #}

About

Twig filter for human readable filesize

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages