Download the PHP package pentatrion/upload-bundle without Composer
On this page you can find all versions of the php package pentatrion/upload-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pentatrion/upload-bundle
More information about pentatrion/upload-bundle
Files in pentatrion/upload-bundle
Package upload-bundle
Short Description Upload Helper and File Manager for your Symfony App
License MIT
Informations about the package upload-bundle
UploadBundle for your Symfony application.
This Symfony bundle provides :
- Upload Helpers
- Endpoints for a Mini File Manager in your Symfony Application.
- Twig functions for your uploaded files
- FilePickerType for your forms
Installation
Recommended optional dependencies
- symfony/validator : required for upload file validation
- liip/imagine-bundle : required to use thumbnails with your file manager.
- imagine/imagine : required for image modification (resize, crop, rotation)
Other dependencies
- symfony/security-bundle : only required with FilePickerType
If you have installed liip/imagine-bundle
, configure at least the small
filter for your thumbnails.
Create directories with Apache user access in upload path and liipImagineBundle cache path (public/uploads
, public/media
)
Utilisation
FileHelper
in your FormType create a non mapped FileType
in your Controller
Twig functions
The bundle provide 2 twig functions :
- uploaded_file_web_path('path/to/file', '
') - uploaded_image_filtered('path/to/file', 'filter', '
')
in your page/show.html.twig
template
with Mini File Manager JS library.
this bundle has been designed to integrate perfectly with Mini File Manager.
He offers /media-manager
endpoint for the backend integration.
without helpers
with helpers
Twig template for the file manager. the mini-file-manager config is placed in data-props attribute.
Twig template for the file picker.
If you want more details about configuration, check Mini File Manager.
If you want exemple, check Mini File Manager Template
FilePickerType with mini-file-manager for your form
for full-list of imageOptions, have a look into mini-file-manager#Configuration repository.
add custom form theme for your form builder :
look at _form_theme.html.twig
Advanced Bundle Configuration
configure your upload directories
package configuration
if you set your class who implement UploadedFileHelperInterface (file_infos_helper
option), you can extends UploadedFileHelper base class.
You have to add 3 binding for your constructor
Manual installation
if you do not want to use the recipe or want to see in depth what is modified by it.
add upload routes to your Symfony app.
add a config file for your bundle
if you have installed liip/imagine-bundle add the small filter.
All versions of upload-bundle with dependencies
liip/imagine-bundle Version ^2.6
php Version ^7.2.5 || ^8.0
symfony/mime Version ^4.4 || ^5.0 || ^6.0
symfony/config Version ^4.4 || ^5.0 || ^6.0
symfony/dependency-injection Version ^4.4 || ^5.0 || ^6.0
symfony/http-kernel Version ^4.4 || ^5.0 || ^6.0
symfony/framework-bundle Version ^4.4 || ^5.0 || ^6.0
symfony/security-bundle Version ^4.4 || ^5.0 || ^6.0
symfony/serializer Version ^4.4 || ^5.0 || ^6.0
symfony/twig-bundle Version ^4.4 || ^5.0 || ^6.0
symfony/validator Version ^4.4 || ^5.0 || ^6.0
symfony/form Version ^4.4 || ^5.0 || ^6.0
symfony/finder Version ^4.4 || ^5.0 || ^6.0