spe/filesize-extension-bundle

There is no license information available for the latest version (2.0.0) of this package.

Twig filter for human readable filesize

2.0.0 2020-03-14 13:42 UTC

This package is not auto-updated.

Last update: 2024-11-03 11:51:43 UTC


README

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 #}