PHPackages                             ttiantianle/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. [File &amp; Storage](/categories/file-storage)
4. /
5. ttiantianle/upload

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

ttiantianle/upload
==================

v1.2.0(5y ago)138MITJavaScript

Since Jun 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ttiantianle/upload-img)[ Packagist](https://packagist.org/packages/ttiantianle/upload)[ RSS](/packages/ttiantianle-upload/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (8)Used By (0)

> 基于fileinput的yii2图片上传封装

上传图片
====

[](#上传图片)

1. 在配置文件中,添加别名@ttiantianle

```
'aliases' => [
        '@bower' => '@vendor/bower-asset',
        '@npm'   => '@vendor/npm-asset',
        '@ttiantianle' =>'@vendor/ttiantianle'
    ],

```

2.在需要上传图片文件的试图中注册静态资源

```
use ttiantianle\upload\UploadAsset;
UploadAsset::register($this);

```

3. 在需要上传图片（文件）的地方，调用方法，例如

```
单图：

多图：

```

4. 修改上传图片的路径 ttiantianle/upload/src/UploadWidgets.php中的uploadFile方法

```
  $('#$uploadInputId').fileinput({
        language: 'zh',
        uploadUrl: '?r=file/upload-file&type=$type&path=$path&size=$size',//换成自己的上传图片接口，可参照ttiantianle/upload/src/FileController.php
        deleteUrl: '?r=file/del-file',
        overwriteInitial: false,
        allowedFileTypes: [$type],
        initialPreviewAsData: true,
        initialPreviewShowDelete:true,
        maxFileCount:$maxFileCount,
        initialPreview:$initialPreview,
        initialPreviewConfig:$initialPreviewConfig,
    })});

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

7

Last Release

2172d ago

### Community

Maintainers

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

---

Top Contributors

[![ttiantianle](https://avatars.githubusercontent.com/u/37570005?v=4)](https://github.com/ttiantianle "ttiantianle (17 commits)")

### Embed Badge

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

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

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

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[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)

PHPackages © 2026

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