PHPackages                             myzero1/yii2-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. myzero1/yii2-upload

ActiveYii2-module

myzero1/yii2-upload
===================

Upload for yii2 app

1.1.1(2y ago)0732BSD-3-ClausePHP

Since Nov 14Pushed 2y agoCompare

[ Source](https://github.com/myzero1/yii2-upload)[ Packagist](https://packagist.org/packages/myzero1/yii2-upload)[ RSS](/packages/myzero1-yii2-upload/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (3)Versions (12)Used By (2)

yii2-upload
===========

[](#yii2-upload)

You can upload file,Just a add a widget to view.

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

[](#installation)

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

Either run

```
php composer.phar require myzero1/yii2-upload：1.*

```

or add

```
"myzero1/yii2-upload": "~1"

```

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

Setting
-------

[](#setting)

Once the module is installed, simply modify your application configuration as follows:

```
return [
    'modules' => [
        'upload' => [
            'class' => 'myzero1\yii2upload\Tools',
            'upload' => [
                'basePath' => '@webroot/upload',
                'baseUrl' => '@web/upload',
            ],
        ],
        // ...
    ],
    // ...
];
```

Usage
-----

[](#usage)

Add upload widget like following:

```

echo \myzero1\yii2upload\widget\upload\Upload::widget([
    'model' => $model,
    'attribute' => 'logo',
    // 'url' => ['/tools/upload/upload'], // default ['/tools/upload/upload'],
    // 'sortable' => true,
    // 'maxFileSize' => 200  * 1024, // 200k
    // 'minFileSize' => 1 * 1024, // 1k
    // 'maxNumberOfFiles' => 1, // default 1,
    // 'acceptFileTypesNew' => [], // default ['gif','jpeg','jpg','png'],
    // 'acceptFileTypes' => new \yii\web\JsExpression('/(\.|\/)(gif|jpe?g|png)$/i'),// if it is null，the acceptFileTypesNew will working.
    // 'showPreviewFilename' => false,
    // 'clientOptions' => []
]);

```

With ActiveForm

```

echo $form->field($model, 'logo')->widget(
    '\myzero1\yii2upload\widget\upload\Upload',
    [
        // 'url' => ['/tools/upload/upload'], // default ['/tools/upload/upload'],
        // 'sortable' => true,
        // 'maxFileSize' => 200  * 1024, // 200k
        // 'minFileSize' => 1 * 1024, // 1k
        // 'maxNumberOfFiles' => 1, // default 1,
        // 'acceptFileTypesNew' => [], // default ['gif','jpeg','jpg','png'],
        // 'acceptFileTypes' => new \yii\web\JsExpression('/(\.|\/)(gif|jpe?g|png)$/i'),// if it is null，the acceptFileTypesNew will working.
        // 'showPreviewFilename' => false,
        // 'clientOptions' => []
    ]
);

```

You can then access Upload testing through the following URL:

```
http://localhost/path/to/index.php?r=upload/upload/test

```

or if you have enabled pretty URLs, you may use the following URL:

```
http://localhost/path/to/index.php/upload/upload/test

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~232 days

Recently: every ~520 days

Total

10

Last Release

1010d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd830aa8b61e8e429808b2af77913f72656f0701b4f1fcd082782b90c5b04717?d=identicon)[myzero1](/maintainers/myzero1)

---

Top Contributors

[![myzero1](https://avatars.githubusercontent.com/u/22048203?v=4)](https://github.com/myzero1 "myzero1 (12 commits)")[![mywoogle](https://avatars.githubusercontent.com/u/8934318?v=4)](https://github.com/mywoogle "mywoogle (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/myzero1-yii2-upload/health.svg)

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

###  Alternatives

[yii2-starter-kit/yii2-starter-kit

Yii2 Starter Kit Application Template

1.4k6.6k](/packages/yii2-starter-kit-yii2-starter-kit)

PHPackages © 2026

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