PHPackages                             mhunesi/yii2-storage - 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. mhunesi/yii2-storage

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

mhunesi/yii2-storage
====================

File Storage Abstraction for Yii2

v2.0.0(4mo ago)133MITPHP

Since Jan 17Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/mhunesi/yii2-storage)[ Packagist](https://packagist.org/packages/mhunesi/yii2-storage)[ RSS](/packages/mhunesi-yii2-storage/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (13)Versions (4)Used By (0)

Yii2 Storage Component
======================

[](#yii2-storage-component)

File Storage Component for Yii2

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist mhunesi/yii2-storage "*"

```

or add

```
"mhunesi/yii2-storage": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
'components' => [
    //...
    'storage' => [
        'class' => '\mhunesi\storage\Storage',
        'defaultStorage' => 'local',
        'queueFilters' => true,
        'queueFiltersList' => ['tiny-crop', 'medium-thumbnail'],
        'downloadValidationKey' => 'YII_STORAGE_KEY',
        'downloadUrl' => '/site/download',
        'storages' => [
            'local' => [
                'class' => '\mhunesi\storage\filesystem\LocalFilesystem',
                'path' => '@app/web/uploads'
            ],
            'aws' => [
                'class' => 'mhunesi\storage\filesystem\AwsS3Filesystem',
                'bucket' => 'bucket_name',
                'key' => '_key',
                'secret' => 'secret_key',
                'region' => 'eu-central-1',
                // 'version' => 'latest',
                'prefix' => 'wss',
            ],
            'minio' => [
                'class' => 'mhunesi\storage\filesystem\AwsS3Filesystem',
                'bucket' => 'bucket_name',
                'key' => '_key',
                'secret' => 'scret_key',
                'region' => 'eu-central-1',
                // 'version' => 'latest',
                // 'baseUrl' => 'your-base-url',
                'prefix' => 'subfolder',
                // 'options' => [],
                'endpoint' => 'http://127.0.0.1:49160'
            ],
            'ftp' => [
                'class' => 'mhunesi\storage\filesystem\FtpFilesystem',
                'host' => '192.168.1.1',
                'port' => 21,
                'username' => 'ftp_username',
                'password' => 'ftp_password',
                // 'ssl' => true,
                // 'timeout' => 60,
                'root' => '/rootPath',
                'publicUrl' => 'http://ftp_url/',
                // 'permPrivate' => 0700,
                // 'permPublic' => 0744,
                // 'passive' => false,
                // 'transferMode' => FTP_TEXT,
            ],
        ]
    ]

    //...
],
```

```
'controllerMap' => [
    'migrate' => [
            //..
        'migrationNamespaces' => [
            //..
        ],
        'migrationPath' => [
            //..
            '@mhunesi/storage/migrations'
        ]
    ]
],
```

Upload &amp; Download Action

```
/**
     * {@inheritdoc}
     */
    public function actions()
    {
        return [
            'download' => [
                'class' => 'mhunesi\storage\actions\DownloadAction',
            ],
            'upload' => [
                'class' => 'mhunesi\storage\actions\FileUploadAction',
                'use_strict' => true,
                'path' => 'folder/folder',
                'folder' => 1,
                'hidden' => true,
                'visibility' => 'public' // 'private'
            ],
        ];
    }
```

URL Rules

```
'rules' => [
    'download//' => 'site/download'
]
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance76

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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 ~555 days

Total

3

Last Release

146d ago

Major Versions

v1.0.1 → v2.0.02026-01-31

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15876915?v=4)[Mustafa Hayri ÜNEŞİ](/maintainers/mhunesi)[@mhunesi](https://github.com/mhunesi)

---

Top Contributors

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

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/mhunesi-yii2-storage/health.svg)

```
[![Health](https://phpackages.com/badges/mhunesi-yii2-storage/health.svg)](https://phpackages.com/packages/mhunesi-yii2-storage)
```

###  Alternatives

[budyaga/yii2-cropper

Yii-Framework widget for uploading and cropping images

4370.1k4](/packages/budyaga-yii2-cropper)[liyunfang/yii2-upload-behavior

Upload behavior for Yii 2

161.7k](/packages/liyunfang-yii2-upload-behavior)

PHPackages © 2026

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