netbull / media-bundle
Media bundle
Installs: 9 641
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: 8.*
- ext-curl: *
- aws/aws-sdk-php: 3.*
- imagine/imagine: 1.*
- knplabs/doctrine-behaviors: ^2.0
- knplabs/gaufrette: 0.9.*
- symfony/form: 6.4.*
- symfony/http-client: 6.4.*
- symfony/mime: 6.4.*
- symfony/process: 6.4.*
- dev-master
- v6.4.14
- v6.4.13
- v6.4.12
- v6.4.11
- v6.4.10
- v6.4.9
- v6.4.8
- v6.4.7
- v6.4.6
- v6.4.5
- v6.4.4
- v6.4.3
- v6.4.2
- v6.4.1
- v6.4.0
- v6.3.0
- v6.2.0
- v6.1.6
- v6.1.5
- v6.1.4
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1.0
- v6.0.2
- v6.0.1
- v6.0.0
- 5.x-dev
- v5.5.6
- v5.5.5
- v5.5.4
- v5.5.3
- v5.5.2
- v5.5.1
- v5.5.0
- v5.4.3
- v5.4.2
- v5.4.1
- v5.4.0
- v5.2.8
- v5.2.7
- v5.2.6
- v5.2.5
- v5.2.4
- v5.2.3
- v5.2.2
- v5.2.1
- v5.2.0
- v5.1.4
- v5.1.3
- v5.1.2
- v5.1.1
- v5.1.0
- v5.0.1
- v5.0.0
- 4.x-dev
- v4.4.11
- v4.4.10
- v4.4.9
- v4.4.8
- v4.4.7
- v4.4.6
- v4.4.5
- v4.4.4
- v4.4.3
- v4.4.2
- v4.4.1
- v4.4.0
- v2.3.1
- v2.3.0
- v2.2.5
- v2.2.4
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.32
- v2.1.31
- v2.1.30
- v2.1.29
- v2.1.28
- v2.1.27
- v2.1.26
- v2.1.25
- v2.1.24
- v2.1.23
- v2.1.22
- v2.1.21
- v2.1.20
- v2.1.19
- v2.1.18
- v2.1.17
- v2.1.16
- v2.1.15
- v2.1.14
- v2.1.13
- v2.1.12
- v2.1.11
- v2.1.10
- v2.1.9
- v2.1.8
- v2.1.7
- v2.1.6
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.12
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
This package is auto-updated.
Last update: 2024-11-06 08:38:42 UTC
README
Mod of SonataMediaBundle
Installation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
$ composer require netbull/media-bundle
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require netbull/media-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
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:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new NetBull\MediaBundle\NetBullMediaBundle(), ); // ... } // ... }
Step 3: Configure the Bundle
Example configuration file
app/config/netbull_media.yml
parameters: quality: 80 formats: tiny: { width: 41, quality: '%quality%' } thumb: { width: 223, quality: '%quality%' } normal: { width: 590, quality: '%quality%' } big: { width: 1280, quality: '%quality%' } download: strategy: media.security.public_strategy mode: http default_context: download: '%download%' providers: - media.provider.image formats: '%formats%' netbull_media: default_context: 'default' providers: image: service: media.provider.image resizer: media.resizer.square filesystem: media.filesystem.s3 cdn: media.cdn.server file: service: media.provider.file resizer: false filesystem: media.filesystem.s3 cdn: media.cdn.server thumbnail: media.thumbnail.format allowed_extensions: ['pdf', 'txt', 'rtf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pttx', 'odt', 'odg', 'odp', 'ods', 'odc', 'odf', 'odb', 'csv', 'xml', 'html'] allowed_mime_types: ['application/pdf', 'application/x-pdf', 'application/rtf', 'text/html', 'text/rtf', 'text/plain'] cdn: server: paths: - 'YOUR_CDN_DOMAIN' filesystem: s3: defaults: region: eu-central-1 /or other aws zone/ version: latest credentials: key: AWS KEY secret: AWS SECRET options: bucket: 'AWS BUCKET NAME' cache_control: max-age=604800 meta: Cache-Control: max-age=604800 contexts: default: '%default_context%'