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
Copyright (c) 2013 Kevin Bond <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.