netbull/media-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

netbull/media-bundle

最新稳定版本:v7.1.0

Composer 安装命令:

composer require netbull/media-bundle

包简介

Media bundle

README 文档

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%'

统计信息

  • 总下载量: 13.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固