wemxo / filer-bundle
Useful symfony bundle to manage file storage.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.0.2
- ext-openssl: *
- knplabs/knp-gaufrette-bundle: ^0.9.0
- liip/imagine-bundle: ^2.13
- symfony/framework-bundle: ^6.0|^7.0
- symfony/yaml: ^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.65
- symfony/phpunit-bridge: ^6.0|^7.0
This package is auto-updated.
Last update: 2025-06-30 23:15:53 UTC
README
The filer bundle is a symfony bundle that allow you to manage files storage.
Usage
1- Configuration
# /config/packages/filer.yaml
filer:
types:
profile_picture:
folder: profile_picture
access: public
mime_types: [image/jpeg, image/png]
max_size: 5000000
filters: [thumbnail]
apply_watermarK: true
keep_source: false
source: thumbnail
accesses:
private: 'private_filesystem'
public: 'public_filesystem'
private_filesystem
andpublic_filesystem
should be services alias ofGaufrette\FilesystemInterface
.thumbnail
must be a defined filter inliip_imagine
filter_sets
configuration.
2- Example
<?php
namespace App;
classe MyService {
public function __construct(private FilerInterface $passwordFiler, private FilerInterface $emailFiler)
{
}
public function testEncryptPassword(string $text): string
{
return $this->passwordFiler->encrypt($text);
}
public function testDecryptPassword(string $text): string
{
return $this->passwordFiler->decrypt($text);
}
}