PHPackages                             hyiif/file-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. hyiif/file-upload

ActiveYii2-extension

hyiif/file-upload
=================

The ueditor extension for the Yii framework

1048JavaScript

Since Apr 19Pushed 10y ago4 watchersCompare

[ Source](https://github.com/org-yii-china/yii2-file-upload)[ Packagist](https://packagist.org/packages/hyiif/file-upload)[ RSS](/packages/hyiif-file-upload/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 插件整合-图片上传（file-upload）

实例教程：

安装扩展：

1.点击上面扩展下载下载扩展

然后重命名为file\_upload放在/common/widgets文件夹中

2.在使用图片上传控件的控制器（controller）中，加入以下代码

```
public function actions()
{
    return [
        'upload'=>[
            'class' => 'common\widgets\file_upload\UploadAction',     //这里扩展地址别写错
            'config' => [
                'imagePathFormat' => "/image/{yyyy}{mm}{dd}/{time}{rand:6}",
            ]
        ]
    ];
}

```

3.views渲染图片上传界面有两种方式：

第一种：不带model

```
use common\widgets\file_upload\FileUpload;   //引入扩展
echo FileUpload::widget();
echo FileUpload::widget(['value'=>$url]);    //如果编辑时要带默认图，$url为图片路径
```

第二种：带model

```
$form = ActiveForm::begin();
    echo $form->field($model, 'label_img')->widget('common\widgets\file_upload\FileUpload',[
        'config'=>[
            '图片上传的一些配置，不写调用默认配置'
        ]
    ]);
ActiveForm::end();
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/13dbd7683d3c4ae1f22f829953cc5f5f12e9ad3207d6a7c9e48af96365344ef6?d=identicon)[yii-china.com](/maintainers/yii-china.com)

---

Top Contributors

[![Huangxianan](https://avatars.githubusercontent.com/u/14814279?v=4)](https://github.com/Huangxianan "Huangxianan (12 commits)")

### Embed Badge

![Health badge](/badges/hyiif-file-upload/health.svg)

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

PHPackages © 2026

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