PHPackages                             life2016/yii2-webuploader - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. life2016/yii2-webuploader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

life2016/yii2-webuploader
=========================

yii2-webuploader

1.9(9y ago)4761[2 issues](https://github.com/ran1990/yii2-webuploader/issues)JavaScriptPHP &gt;=5.4.0

Since Jun 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ran1990/yii2-webuploader)[ Packagist](https://packagist.org/packages/life2016/yii2-webuploader)[ RSS](/packages/life2016-yii2-webuploader/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (11)Used By (0)

\##webuploader

```
===============================

```

[![Effect picture 1](https://github.com/ran1990/yii2-webuploader/raw/master/multi_image.png "Effect picture 1")](https://github.com/ran1990/yii2-webuploader/blob/master/multi_image.png)
[![Effect picture 1](https://github.com/ran1990/yii2-webuploader/raw/master/more_file.png "Effect picture 1")](https://github.com/ran1990/yii2-webuploader/blob/master/more_file.png)

1.安装
----

[](#1安装)

```
composer require life2016/yii2-webuploader

借鉴yiidashi，地址：https://github.com/yidashi/yii2-webuploader

本次改版主要是，支持多张图片上传，图片与文件分开，严格控制图片上传格式，
需要注意的是：文件中涉及到Yii::$app->params[变量]，请自行前往设置，这里不做说明，贴代码如下：
    // 允许图片上传最大大小字节
    'imageMaxSize' => 2048000,
    //允许文件上传最大大小,字节
    'fileMaxSize' => 10240000,
    //允许视频上传最大大小字节
    'videoMaxSize' => 20480000,
    //多文件上传限制数量
    'MaxNumber' => 10,

	    //文件后缀限制
    'file_exts' => [
        "rar",
        "zip",
        "tar",
        "gz",
        "doc",
        "docx",
        "xls",
        "xlsx",
        "ppt",
        "pptx",
        "pdf",
        "txt",
        "md",
        "xml",
        "csv"
    ],
    //视频后缀限制
    'video_exts' => [
        "flv",
        "swf",
        "mkv",
        "avi",
        "rm",
        "rmvb",
        "mpeg",
        "mpg",
        "ogg",
        "ogv",
        "mov",
        "wmv",
        "mp4",
        "webm",
        "mp3",
        "wav",
        "mid"
    ],
    //图片后缀限制
    'image_exts' => [
        'gif',
        'jpg',
        'jpeg',
        'bmp',
        'png'
    ],

```

2.使用
----

[](#2使用)

2.1使用FileWebUploader上传文件
------------------------

[](#21使用filewebuploader上传文件)

```

```

\##2.2使用MultipeWebuploader上传多图片，严格限制图片格式，支持限制上传多少张图片，参数number,\['options'=&gt;\['boxId' =&gt; 'picker','number'=&gt;'10'\]\]

```

```

2.3使用Webuploader上传单张图片，
-----------------------

[](#23使用webuploader上传单张图片)

```

```

注意：options非必填，同一页面多个上传按钮，需要特别指定\['options'=&gt;\['boxId'=&gt;'不同id','multiple'=&gt;'第几个上传文件按钮序号'\]，multiple解决webuploader插件在dispaly隐藏情况下不事件失效，只需要隐藏后执行函数initUploadImage(第几个上传文件按钮序号)

使用默认action处理的话controller需要添加

```
public function actions()
{
    return [
        'webupload' => 'yidashi\webuploader\WebuploaderAction'
    ];
}

```

如果需要使用自己的上传程序处理需添加server属性

```

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Total

10

Last Release

3503d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96126fb674e49c89c16c8f6cf2c0fca53197b35ed04a77bc0a7f1a942d32fafe?d=identicon)[ran](/maintainers/ran)

---

Top Contributors

[![ran1990](https://avatars.githubusercontent.com/u/18184629?v=4)](https://github.com/ran1990 "ran1990 (3 commits)")

### Embed Badge

![Health badge](/badges/life2016-yii2-webuploader/health.svg)

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

###  Alternatives

[ergebnis/rector-rules

Provides rules for rector/rector.

10245.6k49](/packages/ergebnis-rector-rules)

PHPackages © 2026

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