bytescommerce / easy-admin-file-upload-field
Adds a new field to easyAdmin
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- easycorp/easyadmin-bundle: ^4
- symfony/asset: ^7.2
- symfony/config: ^7
- symfony/console: 7.2.*
- symfony/dotenv: 7.2.*
- symfony/event-dispatcher: ^7.2
- symfony/flex: ^2
- symfony/framework-bundle: ^7
- symfony/http-kernel: ^7
- symfony/translation: ^7.2
- symfony/yaml: ^7.2
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.6.22
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2025-04-02 09:53:11 UTC
README
Finally upload files via backend of EasyAdmin
Long gone are the times where you cannot easily upload files trough an easy-admin backend CRUD controller!
Now with this little adaption its very easy to implement a file upload field in your EasyAdmin backend.
How to use it
- Install the package via composer
composer require bytescommerce/easy-admin-file-upload-field
- Add a File Field to your EasyAdmin CRUD controller
use BytesCommerce\FileUploadField\Field\FileField; yield FileField::new('filename', t('File')) ->setBasePath(sprintf('%s', File::BASE_FILE_PATH)) ->setUploadDir(sprintf('public/%s', File::BASE_FILE_PATH)) ->setUploadedFileNamePattern('[name].[extension]') ->setColumns('col-sm-12 col-md-6');
And you're done.
Proudly presented by Bytes Commerce ❇️