PHPackages                             kaysonwu/flysystem-aliyun-oss - 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. kaysonwu/flysystem-aliyun-oss

Abandoned → [illusionist/flysystem-aliyun-oss](/?search=illusionist%2Fflysystem-aliyun-oss)Library[File &amp; Storage](/categories/file-storage)

kaysonwu/flysystem-aliyun-oss
=============================

Flysystem adapter for the Aliyun OSS SDK

1.0.0(6y ago)516.2k↓18.6%1MITPHPPHP &gt;=5.5.9CI failing

Since Dec 20Pushed 6y ago1 watchersCompare

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

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

Kaysonwu\\Flysystem\\Aliyun-OSS
-------------------------------

[](#kaysonwuflysystemaliyun-oss)

[![Author](https://camo.githubusercontent.com/996e38f2e2ec7069407848046bb77bc9d4e426ce24a98495c5890ac18fdfa099/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406b6179736f6e57752d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/kaysonwu)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/fbdd962bc71f4f88f167a65a94dcc256eb6b8e5d845ac7b8d0f50d6fc9c05c96/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6179736f6e77752f666c7973797374656d2d616c6979756e2d6f73732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaysonwu/flysystem-aliyun-oss)[![Total Downloads](https://camo.githubusercontent.com/1a7cb8b7f2156f1e3c81d1d578bcd7ca6966b317df1f04670ec5057acedf3a2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6179736f6e77752f666c7973797374656d2d616c6979756e2d6f73732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaysonwu/flysystem-aliyun-oss)

[使用中文阅读](https://github.com/kaysonwu/aliyun-oss/blob/master/README-CN.md)

Advantages
----------

[](#advantages)

1. Support Laravel &amp; Lumen
2. Compared with [xxtime/flysystem-aliyun-oss](https://github.com/xxtime/flysystem-aliyun-oss), it is more in line with the [flysystem](https://flysystem.thephpleague.com/docs/architecture/) interface specification. Because the flysystem interface suggests that the return value is array or bool, but [xxtime/flysystem-aliyun-oss](https://github.com/xxtime/flysystem-aliyun-oss) is not very strict about exception handling.
3. Compared to [apollopy/flysystem-aliyun-oss &lt;= 1.2.0](https://github.com/apollopy/flysystem-aliyun-oss) supports visibility get/set.
4. Support Dynamically call OSS SDK methods.

**ps:** The comparison of similar projects is only to highlight the differences. In fact, they are all very good.

Installation
------------

[](#installation)

#### Install via composer

[](#install-via-composer)

Run the following command to pull in the latest version:

```
composer require kaysonwu/flysystem-aliyun-oss
```

#### Laravel Install

[](#laravel-install)

If your laravel version ` [

    ...

    Kaysonwu\Flysystem\Aliyun\OssServiceProvider::class,
]
```

##### Lumen Install

[](#lumen-install)

Add the following snippet to the `bootstrap/app.php` file under the providers section as follows:

```
...

// Add this line
$app->register(Kaysonwu\Flysystem\Aliyun\OssServiceProvider::class);
```

##### Config for Laravel/Lumen

[](#config-for-laravellumen)

Add the adapter config to the `disks` array in the `config/filesystems.php` config file as follows:

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

    'aliyun-oss' => [

        'driver' => 'aliyun-oss',

        /**
         * The AccessKeyId from OSS or STS.
         */
        'key' => '',

        /**
         * The AccessKeySecret from OSS or STS
         */
        'secret' => '',

        /**
         * The domain name of the datacenter.
         *
         * @example: oss-cn-hangzhou.aliyuncs.com
         */
        'endpoint' => '',

        /**
         * The bucket name for the OSS.
         */
        'bucket' => '',

        /**
         * The security token from STS.
         */
        'token' => null,

        /**
         * If this is the CName and binded in the bucket.
         *
         * Values: true or false
         */
        'cname' => false,

        /**
         * Path prefix
         */
        'prefix' => '',

        /**
         *  Request header options.
         *
         *  @example [x-oss-server-side-encryption => 'KMS']
         */
        'options' => []
    ]
]
```

Usage
-----

[](#usage)

##### Basic

[](#basic)

Please refer to [filesystem-api](https://flysystem.thephpleague.com/docs/usage/filesystem-api/).

```
use Kaysonwu\Flysystem\Aliyun\OssAdapter;
use League\Flysystem\Filesystem;
use OSS\OssClient;

$client = new OssClient(
    '',
    '',
    ''
);

$adapter = new OssAdapter($client, '', 'optional-prefix', 'optional-options');
$filesystem = new Filesystem($adapter);

$filesystem->has('file.txt');

// Dynamic call SDK method.
$adapter->setTimeout(30);
$filesystem->getAdapter()->setTimeout(30);
```

##### Laravel/Lumen

[](#laravellumen)

Please refer to [filesystem](https://laravel.com/docs/6.x/filesystem)

```
use Illuminate\Support\Facades\Storage;

Storage::disk('aliyun-oss')->get('path');

// Dynamic call SDK method.
Storage::disk('aliyun-oss')->getAdapter()->setTimeout(30);
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2334d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54e002767d78036837d5bd9fee6f8b2d0261fd3783d75c34a5589f4674b25974?d=identicon)[kayson](/maintainers/kayson)

---

Top Contributors

[![kaysonwu](https://avatars.githubusercontent.com/u/14865584?v=4)](https://github.com/kaysonwu "kaysonwu (14 commits)")

---

Tags

filesystemlaravellumenaliyun-oss

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kaysonwu-flysystem-aliyun-oss/health.svg)

```
[![Health](https://phpackages.com/badges/kaysonwu-flysystem-aliyun-oss/health.svg)](https://phpackages.com/packages/kaysonwu-flysystem-aliyun-oss)
```

###  Alternatives

[jerodev/flysystem-v3-smb-adapter

SMB adapter for Flysystem v3

1289.9k1](/packages/jerodev-flysystem-v3-smb-adapter)[yoelpc4/laravel-cloudinary

Laravel Cloudinary filesystem cloud driver.

3343.0k](/packages/yoelpc4-laravel-cloudinary)

PHPackages © 2026

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