PHPackages                             pc-brainy/yii2-uploader - 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. pc-brainy/yii2-uploader

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

pc-brainy/yii2-uploader
=======================

Images uploader

0121PHP

Since Nov 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/pc-brainy/yii2-uploader)[ Packagist](https://packagist.org/packages/pc-brainy/yii2-uploader)[ RSS](/packages/pc-brainy-yii2-uploader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Uploader
========

[](#uploader)

Uploader

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require pc-brainy/yii2-uploader "dev-master"

```

or add

```
"pc-brainy/yii2-uploader" : "dev-master"
```

to the require section of your application's `composer.json` file.

Configure
---------

[](#configure)

1. Add in common/config/main.php 'controllerMap' =&gt; \[ 'uploader' =&gt; 'brainy\\uploader\\controllers\\UploaderController', \],

    Yii::setAlias('storage', dirname(dirname(**DIR**)) . '/storage'); Yii::setAlias('images', dirname(dirname(**DIR**)) . '/storage/images');

Usage
-----

[](#usage)

with default parameters

```

```

with parameters

```

```

Parameters
----------

[](#parameters)

```
model
    ["\brainy\uploader\models\Photo", "image"] //[class, attribute]
    modelul AR in care vor fi salvate informatiile despre imagini

slug
    true/false - convert filename to slugged name
    converteste denumirea fisierului minuscule-minuscule.ext

uniqid
    true/false - add an uniq ID to filename
    adauga la numele fisierului un id unic

modal = true
    display a button to launch modal window of uploader

thumbnailSize
    not set of set false = keep actual size
    [300,200] => [width,height]px
    300 => square of 300px

uploadUrl
    set only if will be used your function to upload

multiplePath
    'multiplePath'=>[
        'folderName'=>false, //save original size
        'anotherFolderName'=>[400, 400], //save thumbnails with 400px X 400px
        'andAnotherFolderName'=>[150, 150]  //save thumbnails with 150px X 150px
        .......
    ],

filename
    a string to be used as filename for saved file

dbFields
    'dbFields'=>[
        'owner_id'=> $product->id,
        'order'=>'999'
    ]
    pairs of informations to be saved in model in various field, along filename
    'field'=>'value'

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fb9312c4c7356d156a8c8f5da7661c2ea2aac1f8e33211df521d36e9529998e?d=identicon)[pc-brainy](/maintainers/pc-brainy)

---

Top Contributors

[![pc-brainy](https://avatars.githubusercontent.com/u/13269904?v=4)](https://github.com/pc-brainy "pc-brainy (10 commits)")[![ovidiupop](https://avatars.githubusercontent.com/u/1079754?v=4)](https://github.com/ovidiupop "ovidiupop (2 commits)")

### Embed Badge

![Health badge](/badges/pc-brainy-yii2-uploader/health.svg)

```
[![Health](https://phpackages.com/badges/pc-brainy-yii2-uploader/health.svg)](https://phpackages.com/packages/pc-brainy-yii2-uploader)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

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