PHPackages                             it-blaster/uploadable-behavior - 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. it-blaster/uploadable-behavior

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

it-blaster/uploadable-behavior
==============================

The UploadableBehavior helps you handle uploaded files with Propel

v1.1.0(9y ago)09.3k↓44%1MITPHPPHP &gt;=5.3.2

Since Apr 24Pushed 9y ago7 watchersCompare

[ Source](https://github.com/it-blaster/uploadable-behavior)[ Packagist](https://packagist.org/packages/it-blaster/uploadable-behavior)[ Docs](https://github.com/it-blaster/uploadable-behavior)[ RSS](/packages/it-blaster-uploadable-behavior/feed)WikiDiscussions master Synced today

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

UploadableBehavior
==================

[](#uploadablebehavior)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cf7187e9c02c6dd541b3ef11e0470b25dbc485aeb64b437fd36cfb285277d6bb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69742d626c61737465722f75706c6f616461626c652d6265686176696f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/it-blaster/uploadable-behavior/?branch=master) [![Build Status](https://camo.githubusercontent.com/e0f0209db61209395ef433ddce0c494aa6ff16357e8d018aba98e44ab3135a62/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69742d626c61737465722f75706c6f616461626c652d6265686176696f722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/it-blaster/uploadable-behavior/build-status/master) [![License](https://camo.githubusercontent.com/7d41f106cfe33caea345ce993fae1a5ac3fd4befc23513fedbf366efe044ed4b/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f75706c6f616461626c652d6265686176696f722f6c6963656e73652e737667)](https://packagist.org/packages/it-blaster/uploadable-behavior) [![Total Downloads](https://camo.githubusercontent.com/7168bbfc3dbd1da898e1d3ea02a3a05fc18b6c0c92d3c3cc851d1623709c9dc4/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f75706c6f616461626c652d6265686176696f722f646f776e6c6f616473)](https://packagist.org/packages/it-blaster/uploadable-behavior) [![Latest Unstable Version](https://camo.githubusercontent.com/c814e0819d9123f8514930e73bafbd8584a099c5d6c917b404a6f4ff601ad0ba/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f75706c6f616461626c652d6265686176696f722f762f756e737461626c652e737667)](https://packagist.org/packages/it-blaster/uploadable-behavior) [![Latest Stable Version](https://camo.githubusercontent.com/c4b39cf288ad0542e52f09f957a151e033cc065df9863f3557515ba77b5878ad/68747470733a2f2f706f7365722e707567782e6f72672f69742d626c61737465722f75706c6f616461626c652d6265686176696f722f762f737461626c652e737667)](https://packagist.org/packages/it-blaster/uploadable-behavior)

The UploadableBehavior helps you handle uploaded files with Propel.

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

[](#installation)

Add it-blaster/uploadable-behavior to your `composer.json` file and run `composer`

```
...
"require": {
    "it-blaster/uploadable-behavior": "1.0.*"
}
...
```

Register the behavior in your `config.yml`

```
...
propel:
    behaviors:
        uploadable: Fenrizbes\UploadableBehavior\Behavior\UploadableBehavior
...
```

Usage
-----

[](#usage)

Add the behavior to your table:

```
...

...
```

By default it finds or creates a varchar column named `file`, but you can configure your own columns:

```
...

...
```

Extending
---------

[](#extending)

The behavior adds a few methods to the base class that help it, and you can override and extend any of them.

- `getUploadRoot` returns an absolute path to the web directory of your project. By default it returns the most common path, but the best way is setting this path to a model in your controller.
- `getUploadDir` returns a relative path from the root dir to the file's folder. By default it's `/uploads////`.
- `makeFileName` generates the name for the file randomly.
- `moveUploadedFile` moves the file and sets new value to its column. If you're overriding this method, remember that it has to return a web path to the uploaded file (of course if you don't want to change its behavior).

Notes
-----

[](#notes)

Remember that this behavior handles uploaded files (moves them and sets columns' values) and does nothing more. So:

- if you don't have a view transformer or overridden getters that convert string file paths to `File` objects, set `null` to the `data_class` option of form fields;
- if you send an empty value for file field and don't want to erase column's value, handle it yourself;
- if you want to have a way to delete uploaded files, do it yourself;
- if you need anything else... well, you know.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

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

Every ~245 days

Total

3

Last Release

3598d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11211873?v=4)[Iaroslav Gashuk](/maintainers/fenrizbes)[@fenrizbes](https://github.com/fenrizbes)

---

Top Contributors

[![selezenev](https://avatars.githubusercontent.com/u/3917621?v=4)](https://github.com/selezenev "selezenev (1 commits)")

---

Tags

symfonyuploadBehaviorpropel

### Embed Badge

![Health badge](/badges/it-blaster-uploadable-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/it-blaster-uploadable-behavior/health.svg)](https://phpackages.com/packages/it-blaster-uploadable-behavior)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.7k](/packages/ahmed-bhs-doctrine-doctor)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k13](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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