zenstruck / media-bundle
Provides a simple media/file management GUI for Symfony2
Fund package maintenance!
kbond
Installs: 3 396
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
Type:symfony-bundle
Requires
- jms/serializer: ~0.11
- symfony/symfony: ~2.2
Requires (Dev)
- cocur/slugify: ~0.8
Suggests
- cocur/slugify: CocurSlugifyBundle is required for SlugifyFilenameFilter
- zenstruck/slugify-bundle: If not using CocurSlugifyBundle, then this is required for the SlugifyFilenameFilter
This package is auto-updated.
Last update: 2023-03-17 18:30:25 UTC
README
NOTE: This bundle is under heavy development, use at your own risk
Provides a simple media/file management GUI for Symfony2:
- Integration with CKEditor
- Media form type with browse server
Installation
-
Add to your
composer.json
:composer require zenstruck/media-bundle
-
Download and install the AngularJS module ngUpload to your
web/vendor
folder. I suggest using Bower:bower install ngUpload
-
Optional If using the slugify filename feature, add cocur/slugify to your composer.json
composer require cocur/slugify
-
Register the bundle with Symfony2:
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Zenstruck\MediaBundle\ZenstruckMediaBundle(), // enable if you want to use the slugify filename feature // new Cocur\Slugify\Bridge\Symfony\CocurSlugifyBundle() ); // ... }
Full Default Config
zenstruck_media: default_layout: ZenstruckMediaBundle:Twitter:default_layout.html.twig slugify_filename_filter: false filesystem_class: Zenstruck\MediaBundle\Media\Filesystem media_form_type: false role_permissions: false filesystems: # Required # Prototype name: root_dir: %kernel.root_dir%/../web/files # Required web_prefix: /files # Required secure: false # set true and change the path to a non public path for secure file downloads # Comma separated list of extensions allowed_extensions: ~ # Example: jpg,gif,png