pieceofcake2 / upload
File upload behavior with thumbnail generation for CakePHP 2
Requires
- php: >=8.0
- composer/installers: ^1.0 || ^2.0
- pieceofcake2/cakephp: ^2.12
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.6
- pieceofcake2/app: ^2.2
- pieceofcake2/phpcs-cakephp2: ^1.1
- pieceofcake2/phpstan-cakephp2: ^1.0
Suggests
- ext-gd: For GD-based thumbnail creation
- ext-imagick: For Imagick-based thumbnail creation
Provides
None
Conflicts
None
Replaces
This package is auto-updated.
Last update: 2026-10-16 09:35:16 UTC
README
pieceofcake2/upload is a model behavior that uploads files and generates thumbnails for
CakePHP 2 applications. It is a fork of josegonzalez/cakephp-upload
(2.x branch) for pieceofcake2/cakephp, and replaces
the josegonzalez/cakephp-upload package.
Documentation
- Website: https://pieceofcake2.github.io/upload/ (日本語: https://pieceofcake2.github.io/upload/ja/)
- Markdown: docs/README.md (日本語: docs/ja/README.md) (for AI tools and offline reading)
The Markdown documentation is also included in the Composer package, in the plugin's directory: plugins/Upload/docs/README.md (the location depends on your installer-paths). Install the package with --dev if you only need it for development.
Requirements
- PHP 8.0+
- pieceofcake2/cakephp 2.12+
- GD or Imagick PHP extension (for thumbnail creation)
Installation
composer require pieceofcake2/upload
Your application's composer.json must allow the composer/installers plugin and set
installer-paths; then load the plugin and add the Upload.Upload behavior to your models.
See Installation and Usage.
Contributing
See the contribution guidelines.
Origin
This package is a maintained fork of
FriendsOfCake/cakephp-upload
(josegonzalez/cakephp-upload on Packagist, last upstream version 1.3.1), originally by Jose
Diaz-Gonzalez. It is maintained for CakePHP 2 on modern PHP by
pieceofcake2. Changes from the original are listed in the
commit history since the fork.
License
MIT License. See LICENSE.