PHPackages                             cdcchen/upyun-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. cdcchen/upyun-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

cdcchen/upyun-client
====================

upyun api client

1.1.5(10y ago)02241BSD-4-ClausePHPPHP &gt;=5.4.0

Since Apr 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/cdcchen/upyun-client)[ Packagist](https://packagist.org/packages/cdcchen/upyun-client)[ Docs](https://github.com/cdcchen/upyun-client)[ RSS](/packages/cdcchen-upyun-client/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (11)Used By (1)

又拍云SDK
======

[](#又拍云sdk)

安装
--

[](#安装)

```
composer require cdcchen/upyun-client:^1.0.0

```

文件操作使用教程
--------

[](#文件操作使用教程)

### 实例化 UpYunClient

[](#实例化-upyunclient)

```
use cdcchen\upyun\UpYunClient;

$bucketName = '';
$username = '';
$password = '';
$client = new UpYunClient($bucketName, $username, $password);
```

### 上传文件

[](#上传文件)

```
try {
    $result = $client->writeFile($distFile, $srcFile);
    print_r($result);
} catch (\cdcchen\upyun\ResponseException $e) {
    echo $e->getMessage(), $e->getCode(), PHP_EOL;
} catch (Exception $e) {
    echo $e->getCode(), $e->getMessage(), PHP_EOL;
}
```

### 读取文件

[](#读取文件)

```
$data = $client->readFile($file);
```

### 删除文件

[](#删除文件)

```
$data = $client->deleteFile($file);
```

### 获取文件信息

[](#获取文件信息)

```
$data = $client->getFileInfo($file);
```

### 创建目录

[](#创建目录)

```
$result = $client->createDir($path, $mkdir = true);
```

### 删除目录

[](#删除目录)

```
$result = $client->deleteDir($path);
```

### 读取目录

[](#读取目录)

```
$data = $client->readDir($path);
```

### 获取bucknet存储使用量

[](#获取bucknet存储使用量)

```
$data = $client->getBucketUsage();

```

Url 作图接口
--------

[](#url-作图接口)

```
$delimiter = '!';
$maker = new UrlImageMaker($url, $delimiter);
$maker->fw(200)->scale(2);
$url = $maker->getUrl();
```

所有url做图接口方法直接使用又拍云官方文档对应的作图参数名称。

具体查看：[http://docs.upyun.com/cloud/image/#\_7](http://docs.upyun.com/cloud/image/#_7)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

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

Total

9

Last Release

3715d ago

### Community

Maintainers

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

---

Top Contributors

[![cdcchen](https://avatars.githubusercontent.com/u/748891?v=4)](https://github.com/cdcchen "cdcchen (24 commits)")

---

Tags

httphttpclientupyunphphttpupyunclient

### Embed Badge

![Health badge](/badges/cdcchen-upyun-client/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.0k1.1B6.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k728.6M2.5k](/packages/psr-http-factory)[psr/link

Common interfaces for HTTP links

2.5k149.8M81](/packages/psr-link)[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k36.3M275](/packages/rmccue-requests)[league/uri

URI manipulation library

1.1k228.3M364](/packages/league-uri)

PHPackages © 2026

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