PHPackages                             lucasguo/yii2-upyun - 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. lucasguo/yii2-upyun

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

lucasguo/yii2-upyun
===================

UPYUN sdk for yii2 framework base on offical sdk

v2.2.1(9y ago)0501MITPHPPHP &gt;=5.3.0

Since May 13Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (5)Used By (0)

又拍云Yii2插件
=========

[](#又拍云yii2插件)

[![build](https://camo.githubusercontent.com/0e83fa6a17b515df73cf33dc789c816bd0dafe3abaea85301c3db65f78e20dc0/68747470733a2f2f7472617669732d63692e6f72672f757079756e2f7068702d73646b2e737667)](https://camo.githubusercontent.com/0e83fa6a17b515df73cf33dc789c816bd0dafe3abaea85301c3db65f78e20dc0/68747470733a2f2f7472617669732d63692e6f72672f757079756e2f7068702d73646b2e737667)

又拍云存储Yii2插件，基于 [又拍云存储PHP SDK](https://github.com/upyun/php-sdk)开发。

- \[更新说明\](#update instructions)
- \[使用说明\](#use instructions)
    - [安装](#install)
    - [初始化UpYun](#init)
- [示例](#usage)
    - \[上传文件\](#upload file)
    - \[其他方法\](#other method)

使用说明
----

[](#使用说明)

### 安装

[](#安装)

推荐使用 `composer` 安装

```
composer require lucasguo/yii2-upyun:dev-master

```

### 初始化UpYun

[](#初始化upyun)

将UpYun注册为yii2组件

```
//在config/web.php配置文件中定义component配置信息
'components' => [
  .....
  'upyun' => [
    'class' => 'lucasguo\upyun\UpYun',
    'bucketname' => '空间名称，必填',
    'username' => '操作员账号，必填',
    'password' => '操作员密码，必填',
    'timeout' => '上传请求超时时间，整数，单位秒，选填，默认30',
    'endpoint' => '接入点，选填，选填，默认UpYun::ED_AUTO',
    'basePath' => '上传文件文件夹，如/uploads/，选填，默认/',
    'useOwnDomain' => false;(影响upload方法的返回值，云存储则设为false，自主源则为true)
  ]
  ....
]
```

更多配置说明，详见

### 上传文件

[](#上传文件)

**上传从form中获取的UploadedFile:**

```
$fileUrl = Yii::$app->upyun->upload($file);
```

### 其他方法

[](#其他方法)

其他可用方法，请参考

Yii2 UpYun基于 MIT 开源协议

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 65% 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 ~209 days

Total

2

Last Release

3491d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3516755?v=4)[Hiroshi Miyake](/maintainers/iyak)[@iyak](https://github.com/iyak)

---

Top Contributors

[![lfeng](https://avatars.githubusercontent.com/u/103457?v=4)](https://github.com/lfeng "lfeng (39 commits)")[![sabakugaara](https://avatars.githubusercontent.com/u/3990917?v=4)](https://github.com/sabakugaara "sabakugaara (10 commits)")[![lucasguo](https://avatars.githubusercontent.com/u/1881412?v=4)](https://github.com/lucasguo "lucasguo (7 commits)")[![our80](https://avatars.githubusercontent.com/u/2969393?v=4)](https://github.com/our80 "our80 (3 commits)")[![totoleo](https://avatars.githubusercontent.com/u/4956722?v=4)](https://github.com/totoleo "totoleo (1 commits)")

---

Tags

sdkyii2upyun

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lucasguo-yii2-upyun/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[saviorlv/yii2-dysms

Aliyun SMS SDK for Yii2

1316.8k1](/packages/saviorlv-yii2-dysms)

PHPackages © 2026

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