contextualcode/ezplatform-content-disposition-bundle
最新稳定版本:3.3.3
Composer 安装命令:
composer require contextualcode/ezplatform-content-disposition-bundle
包简介
eZ Platform bundle that gives the ability to specify content dispositions for downloads.
README 文档
README
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
config/bundles.phpby adding this line:
return [
...,
ContextualCode\EzPlatformContentDispositionBundle\ContextualCodeEzPlatformContentDispositionBundle::class => ['all' => true],
];
Add this to your routes.yaml:
content_disposition:
resource: '@ContextualCodeEzPlatformContentDispositionBundle/Resources/config/routing.yml'
Usage
In some parameters block, for example in config/services.yaml, you can specify:
A default content disposition:
ibexa.site_access.config.global.download_content_disposition.default: inlineA content disposition per mimetype:
ibexa.site_access.config.global.download_content_disposition.mimetype: "application/pdf": inline "application/msword": attachmentMake files
cache-control: public, s-maxage=%download_content_disposition.download_file_ttl%and vary by user context hash (default:false).ibexa.site_access.config.default.download_content_disposition.public_download: true ibexa.site_access.config.default.download_content_disposition.download_file_ttl: 86400if
download_content_disposition.download_file_ttlsetting not defined,content.default_ttlwill be used.
统计信息
- 总下载量: 14.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2019-07-23