Download the PHP package cesurapp/media-bundle without Composer
On this page you can find all versions of the php package cesurapp/media-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download cesurapp/media-bundle
More information about cesurapp/media-bundle
Files in cesurapp/media-bundle
Download cesurapp/media-bundle
More information about cesurapp/media-bundle
Files in cesurapp/media-bundle
Vendor cesurapp
Package media-bundle
Short Description Symfony Media Bundle
License MIT
Homepage https://github.com/cesurapp/media-bundle
Package media-bundle
Short Description Symfony Media Bundle
License MIT
Homepage https://github.com/cesurapp/media-bundle
Keywords symfonymedia-bundle
Please rate this library. Is it a good library?
Informations about the package media-bundle
Media Bundle
Media management bundle for Symfony, built on top of cesurapp/storage-bundle.
Features:
- Uploads from HTTP files, base64, remote URLs and raw content
- Image compression, resizing and PNG → JPG conversion
- Media columns stored as JSONB id lists on your entities
- Storage object deleted when the
Mediarow is deleted (after commit) - Safe defaults: active content (html, svg, php…) refused, SSRF-protected downloads, image size limits
Installation
Requirements: PHP 8.4+, Symfony 8.1+, ext-gd, ext-fileinfo
Quick Start
1. Add a Media Column to an Entity
MediaTrait, AvatarTrait and LogoTrait ship with the bundle. Copy one and rename it for another column.
2. Upload
3. Options
Every upload method takes an $options array:
| Option | Default | |
|---|---|---|
imageCompress |
true |
Re-encode jpg/png |
imageConvertJPG |
true |
Convert png/jpeg to jpg |
imageQuality |
75 |
Encoder quality |
imageWidth / imageHeight |
720 / 1280 |
Best-fit box |
imageMaxPixels |
40000000 |
Images above this pixel count are refused before decoding |
private |
false |
Write to the device's private bucket |
storage |
default device | Device key; unknown keys fall back to the default |
maxSize |
null (links: 20 MB) |
Max bytes |
maxFiles |
20 |
Max files per request key (HTTP helpers) |
allowUnsafe |
false |
Accept html, svg, xml, js, php, executables |
allowPrivateNetwork |
false |
Let link downloads reach private/loopback addresses |
downloadTimeout / downloadMaxDuration |
10 / 30 |
Seconds |
4. Access
5. Delete
There is no reference counting. removeMedia(), setMedia() and clearMedia() only change the column;
remove the replaced Media yourself or it stays in storage.
Commands
Upgrading
media.mimeis nowVARCHAR(255)(was 40, too short for Office types): generate a migration.sizeis the stored byte count (after compression). Rows written before keep the original upload size.uploadHttpFile()throwsFileValidationExceptionfor invalid files instead of logging and returning the rawUploadedFile.uploadHttpLink()leaves failed links out of the result instead of returning the URL string.MediaSuperClass::postRemoveMedia()is nowpreRemoveMedia()and no longer flushes.
See GUIDELINES.md for details.
All versions of media-bundle with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.4
ext-gd Version *
ext-fileinfo Version *
symfony/mime Version ^8.1
symfony/uid Version ^8.1
symfony/dependency-injection Version ^8.1
symfony/http-kernel Version ^8.1
symfony/framework-bundle Version ^8.1
symfony/console Version ^8.1
doctrine/dbal Version ^4.4
doctrine/orm Version ^3.7
doctrine/doctrine-bundle Version ^3.3
cesurapp/storage-bundle Version ^1.2
claviska/simpleimage Version ^4.4
symfony/validator Version ^8.1
symfony/http-client Version ^8.1
ext-gd Version *
ext-fileinfo Version *
symfony/mime Version ^8.1
symfony/uid Version ^8.1
symfony/dependency-injection Version ^8.1
symfony/http-kernel Version ^8.1
symfony/framework-bundle Version ^8.1
symfony/console Version ^8.1
doctrine/dbal Version ^4.4
doctrine/orm Version ^3.7
doctrine/doctrine-bundle Version ^3.3
cesurapp/storage-bundle Version ^1.2
claviska/simpleimage Version ^4.4
symfony/validator Version ^8.1
symfony/http-client Version ^8.1
The package cesurapp/media-bundle contains the following files
Loading the files please wait ...