eZ Platform bundle that gives the ability to specify content dispositions for downloads.
This bundle gives the ability to customize content dispositions (inline or attachment) for downloads.
You can specify the default content disposition, and content dispositions per mime type.
composer require
:$ composer require contextualcode/ezplatform-content-disposition-bundle
app/AppKernel.php
by adding this line in the registerBundles
method: public function registerBundles()
{
$bundles = array(
...
new ContextualCode\EzPlatformContentDispositionBundle\ContextualCodeEzPlatformContentDispositionBundle(),
);
}
In some parameters.yml
file, you can specify:
A default content disposition:
ezsettings.global.download_content_disposition.default: inline
A content disposition per mimetype:
ezsettings.global.download_content_disposition.mimetype:
"application/pdf": inline
"application/msword": attachment