Download the PHP package silasjoisten/sonata-multiupload-bundle without Composer
On this page you can find all versions of the php package silasjoisten/sonata-multiupload-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download silasjoisten/sonata-multiupload-bundle
More information about silasjoisten/sonata-multiupload-bundle
Files in silasjoisten/sonata-multiupload-bundle
Package sonata-multiupload-bundle
Short Description A Bundle which allows you to enable Multiupload in Sonata
License MIT
Informations about the package sonata-multiupload-bundle
silasjoisten/sonata-multiupload-bundle
Versions
Sample
Checkout the Sample Project
Installation
Step 1: Download the Bundle
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
If you are using flex register bundle in config/bundles.php
:
Step 3: Configuration
You have to open the configuration file for this bundle and configure the providers which you want to enable multi upload.
Add JavaScript and CSS to SonataAdmin config:
OPTIONAL
There is an option redirect_to
which allows you to redirect after complete upload to your configured page.
HINT: The MultiUploadBundle passes automatically the id's from the uploaded Media
objects
to the redirection route for example: /foo/bar?idx=%5B70%2C71%2C72%5D
so you can take them and create
a gallery from uploaded medias.
Example: Uploading multiple images and create automatically a Gallery
Create controller
The controller takes your request and create in this example a Gallery
with GalleryItems
and redirects to the
edit view of GalleryAdmin
Register route
If you already override the default MediaAdmin
you can add the route in the admin class via
otherwise you can create an AdminExtension
like the following:
and register this extension in your config/services.yaml
Now configure the redirect_to
in config/packages/sonata_multi_upload.yaml
Maybe you need to create an alias for MediaManager
and GalleryManager
like:
Thats it.
Notice that the uploader won't work for Providers like: YouTubeProvider, VimeoProvider!
4. Look & Feel
Used Library:
All versions of sonata-multiupload-bundle with dependencies
oskarstark/symfony-http-responder Version ^1.0.0
sonata-project/admin-bundle Version ^4.2
sonata-project/media-bundle Version ^4.1
symfony/twig-bridge Version ^4.4 || ^5.3 || ^6.0
twig/twig Version ^2.6 || ^3.3