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

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

2512422541/flysystem-upyun
==========================

Upyun flysystem adapter

1.0.1(9mo ago)014MITPHP

Since Aug 14Pushed 9mo agoCompare

[ Source](https://github.com/2512422541/flysystem-upyun)[ Packagist](https://packagist.org/packages/2512422541/flysystem-upyun)[ RSS](/packages/2512422541-flysystem-upyun/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/337409fe76c7869585e855d8bb283cc6be84f2e39bbb2dc940423bcd2a4ee84d/68747470733a2f2f706f7365722e707567782e6f72672f7a656e636f6465782f666c7973797374656d2d757079756e2f762f737461626c65)](https://packagist.org/packages/zencodex/flysystem-upyun)[![Total Downloads](https://camo.githubusercontent.com/2c48ada84bda2948204d4e75ce188e76c99f52e7628775eeb2c5f05ef4e99c26/68747470733a2f2f706f7365722e707567782e6f72672f7a656e636f6465782f666c7973797374656d2d757079756e2f646f776e6c6f616473)](https://packagist.org/packages/zencodex/flysystem-upyun)[![Latest Unstable Version](https://camo.githubusercontent.com/3ec600eae92197c0509b202d16a98c1d9ee6d0a770178b8e663a18f62e117e7d/68747470733a2f2f706f7365722e707567782e6f72672f7a656e636f6465782f666c7973797374656d2d757079756e2f762f756e737461626c65)](https://packagist.org/packages/zencodex/flysystem-upyun)[![composer.lock](https://camo.githubusercontent.com/732daac3705295283b983aea954ef6588fb31656982a8cd7beb63f4ed3fd2483/68747470733a2f2f706f7365722e707567782e6f72672f7a656e636f6465782f666c7973797374656d2d757079756e2f636f6d706f7365726c6f636b)](https://packagist.org/packages/zencodex/flysystem-upyun)[![License](https://camo.githubusercontent.com/d4134a754f9dc7b91b9018e7c89868ad2dbf110910be014e81fd4f1dfcb97de3/68747470733a2f2f706f7365722e707567782e6f72672f7a656e636f6465782f666c7973797374656d2d757079756e2f6c6963656e7365)](https://packagist.org/packages/zencodex/flysystem-upyun)

> 已支持到 php &gt;= 8.0, laravel 8.x

Requirement
===========

[](#requirement)

- PHP &gt;= 5.5.9

安装
==

[](#安装)

直接可以通过 composer 来安装:

```
$ composer require "2512422541/flysystem-upyun"
```

使用
==

[](#使用)

1. 直接使用
-------

[](#1-直接使用)

```
use League\Flysystem\Filesystem;
use ZenCodex\Support\Flysystem\Adapter\UpyunAdapter

$config => [
    'driver'        => 'upyun',
    'bucket'        => '', // 服务名字
    'operator'      => '', // 操作员的名字
    'password'      => '', // 操作员的密码
    'domain'        => '', // 服务分配的域名
    'protocol'      => 'https', // 服务使用的协议，如需使用 http，在此配置 http
];

$adapter = new UpyunAdapter((object)$config);

// 或在 Laravel 中获取 $adapter
$adapter = Storage::disk('upyun')->getAdapter();

$adapter->write('file.md', 'contents');
$adapter->writeStream('file.md', fopen('path/to/your/local/file.jpg', 'r'));

$adapter->rename('foo.md', 'bar.md');
$adapter->copy('foo.md', 'foo2.md');
$adapter->delete('file.md');
$adapter->getUrl('/path/foo/bar/file.md');

$adapter->fileExists('file.md');
$adapter->directoryExists('path/to/dir');
$adapter->read('file.md');

// ...
// $adapter 详细调用方法可参考: src/Adapter/UpyunAdapter.php

// $clientHandler 为 Upyun::class, 直接调用 Upyun 内的方法
$clientHandler = $adapter->getClientHandler();
$clientHandler->purge($remoteUrl);
$clientHandler->usage();
```

>

2. 在 Laravel 中使用
----------------

[](#2-在-laravel-中使用)

1)、`config/app.php` 中添加 `UpyunServiceProvider`:

```
'providers' => [
    // ...
    ZenCodex\Support\Flysystem\UpyunServiceProvider::class,
],
```

2)、`config/filesystems.php` 的 `disks` 中添加下面的配置：

```
'disks' => [
    // ...

    'upyun' => [
        'driver'        => 'upyun',
        'bucket'        => env('UPYUN_BUCKET', ''),// 服务名字
        'operator'      => env('UPYUN_OPERATOR_NAME', ''), // 操作员的名字
        'password'      => env('UPYUN_OPERATOR_PASSWORD', ''), // 操作员的密码
        'domain'        => env('UPYUN_DOMAIN', ''), // 服务分配的域名
        'protocol'     => 'https', // 服务使用的协议，如需使用 http，在此配置 http
    ]
]
```

3)、Laravel Storage 标准 API 调用

```
$disk = Storage::disk('upyun');

$disk->write('file.md', 'contents');
$disk->writeStream('file.md', fopen('path/to/your/local/file.jpg', 'r'));

$disk->rename('foo.md', 'bar.md');
$disk->copy('foo.md', 'foo2.md');
$disk->delete('file.md');

$disk->fileExists('file.md');
$disk->directoryExists('path/to/dir');
$disk->read('file.md');

$disk->listContents();
$disk->fileSize('file.md');
$disk->mimeType('file.md');
$disk->url('/path/foo/bar/file.md');
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance58

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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

Unknown

Total

1

Last Release

271d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28bc98dcd63d6af8e4e837a964fb3c95c26836f0aaf65a511926ab0bf8e6b98d?d=identicon)[superpeng](/maintainers/superpeng)

---

Top Contributors

[![zencodex](https://avatars.githubusercontent.com/u/295317?v=4)](https://github.com/zencodex "zencodex (5 commits)")[![2512422541](https://avatars.githubusercontent.com/u/26000687?v=4)](https://github.com/2512422541 "2512422541 (1 commits)")

---

Tags

Flysystemupyun

### Embed Badge

![Health badge](/badges/2512422541-flysystem-upyun/health.svg)

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

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[oneup/flysystem-bundle

Integrates Flysystem filesystem abstraction library to your Symfony project.

64422.9M66](/packages/oneup-flysystem-bundle)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40029.5M87](/packages/league-flysystem-bundle)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[spatie/flysystem-dropbox

Flysystem Adapter for the Dropbox v2 API

3644.6M68](/packages/spatie-flysystem-dropbox)

PHPackages © 2026

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