ContextualCode\EzPlatformContentDispositionBundle
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.
Installation
- Run
composer require
:
$ composer require contextualcode/ezplatform-content-disposition-bundle
- Enable this bundle in
app/AppKernel.php
by adding this line in theregisterBundles
method:
public function registerBundles()
{
$bundles = array(
...
new ContextualCode\EzPlatformContentDispositionBundle\ContextualCodeEzPlatformContentDispositionBundle(),
);
}
Usage
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
Created by:
Categories:
Downloads:
13140
Stars:
0
Forks:
1
Created:
2019-07-23
Updated:
2024-12-11