PHPackages                             radotch/cakephp-upload - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. radotch/cakephp-upload

ActiveCakephp-plugin[File &amp; Storage](/categories/file-storage)

radotch/cakephp-upload
======================

Upload plugin for CakePHP

1.0.0(7y ago)05MITPHP

Since Feb 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/radotch/cakephp-upload)[ Packagist](https://packagist.org/packages/radotch/cakephp-upload)[ RSS](/packages/radotch-cakephp-upload/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Upload plugin for CakePHP
=========================

[](#upload-plugin-for-cakephp)

Note
----

[](#note)

Hi, there

I am developed this plugin for my own needs. The main task is to move uploaded file on the local file system.

If that covers your needs, use the plugin for free.

Description
-----------

[](#description)

The plugin automate process of upload files and is easy to use with short configuration.

Requirements
------------

[](#requirements)

- CakePHP &gt;= 3.7
- PHP &gt;= 7.0 / recommended 7.2

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require radotch/cakephp-upload

```

Usage
-----

[](#usage)

### Behavior

[](#behavior)

To automate the process of upload files on the server, add Uploadable Behavior in the Model initialize() hook:

```
public function initialize($config = [])
{
    // Other code
    $this->addBehavior('CakeUpload.Uploadable', []);
}

```

#### Behavior configuration

[](#behavior-configuration)

You have to configure all fields that contain uploaded file. No limit of their number but don't forget that have other outer restrictions from servers, forms, e.t.c.

```
public function initialize($config)
{
    // Other code
    $this->addBehavior('CakeUpload.Uploadable', [
        'field-1',
        'field-2',
        'field-3' => [
            'path' => 'path/to/move/uploaded/file'
        ],
        e.t.c.
    ]);
}

```

The settings of configured fields are:

- **path** - relative to CakePHP webroot directory. If not set default path is used.

#### Behavior features

[](#behavior-features)

- Check once again configured fields for errors before save.
- If any error is found apply it to entity and stop upload and save process.
- Move uploaded file in the local file system.
- On edit if entity field is changed, remove old file or just replace if file names are equal.
- When delete entity remove all attached files.

**Note:** Operates only with single uploaded file. Multiple is not supported.

#### Mixin methods

[](#mixin-methods)

- getPath(string $field, array $settings = \[\]) - get configured path or default
- setPath(string $field, string $path) - allow to set path (relative to webroot) on the fly.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2632d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/296ad49c7c509f33d864723601f6177f5db40d7ac8f6318a2e0918982e5dc1c0?d=identicon)[radotch](/maintainers/radotch)

---

Top Contributors

[![radotch](https://avatars.githubusercontent.com/u/20301480?v=4)](https://github.com/radotch "radotch (16 commits)")

### Embed Badge

![Health badge](/badges/radotch-cakephp-upload/health.svg)

```
[![Health](https://phpackages.com/badges/radotch-cakephp-upload/health.svg)](https://phpackages.com/packages/radotch-cakephp-upload)
```

###  Alternatives

[wyrihaximus/fly-pie

Flysystem integration plugin for CakePHP 5

38297.8k](/packages/wyrihaximus-fly-pie)[dereuromark/cakephp-file-storage

This plugin is giving you the possibility to store files in virtually any kind of storage backend. This plugin is wrapping the Gaufrette library (https://github.com/KnpLabs/Gaufrette) library in a CakePHP fashion and provides a simple way to use the storage adapters through the StorageManager class.

104.1k](/packages/dereuromark-cakephp-file-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
