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

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

illusionist/flysystem-aliyun-oss
================================

Flysystem adapter for the Aliyun OSS SDK

1.0.1(4y ago)11.3kMITPHPPHP &gt;=5.5.9

Since Feb 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/illusionist-php/flysystem-aliyun-oss)[ Packagist](https://packagist.org/packages/illusionist/flysystem-aliyun-oss)[ RSS](/packages/illusionist-flysystem-aliyun-oss/feed)WikiDiscussions master Synced today

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

Illusionist Flysystem Aliyun OSS
================================

[](#illusionist-flysystem-aliyun-oss)

Flysystem adapter for the Aliyun OSS SDK

[![packagist](https://camo.githubusercontent.com/46441f8fdb3da42f467ed9503827a386944a31927e2bcb79acaf2d6b2f1b0bfc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/46441f8fdb3da42f467ed9503827a386944a31927e2bcb79acaf2d6b2f1b0bfc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)[![php](https://camo.githubusercontent.com/a122698d40f4083c898dbdf56be7023ce5e5a6a2f41d33031d3a0b36936ef234/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a122698d40f4083c898dbdf56be7023ce5e5a6a2f41d33031d3a0b36936ef234/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)[![downloads](https://camo.githubusercontent.com/46f5ee552b7e0b0a020cbb711c380ef69c55bd1af63fc41330703baa9af4ee4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/46f5ee552b7e0b0a020cbb711c380ef69c55bd1af63fc41330703baa9af4ee4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)[![license](https://camo.githubusercontent.com/b2f3d0e1f032e981fc18c1b4a600bcd87b11e7567f0ac7def1b324c9d7fb7b9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/b2f3d0e1f032e981fc18c1b4a600bcd87b11e7567f0ac7def1b324c9d7fb7b9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696c6c7573696f6e6973742f666c7973797374656d2d616c6979756e2d6f73733f7374796c653d666c61742d737175617265)[![Build Status](https://camo.githubusercontent.com/95728eb85d8890c01b248675e40dd21a54f163fdc498167e39acc7eabe714b29/68747470733a2f2f6170702e7472617669732d63692e636f6d2f696c6c7573696f6e6973742d7068702f666c7973797374656d2d616c6979756e2d6f73732e7376673f6272616e63683d312e78)](https://app.travis-ci.com/illusionist-php/flysystem-aliyun-oss)

English | [中文](README-zh_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 illusionist/flysystem-aliyun-oss
```

#### Laravel Install

[](#laravel-install)

If your laravel version ` [

    ...

    Illusionist\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(Illusionist\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 Illusionist\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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Every ~0 days

Total

3

Last Release

1592d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/682799?v=4)[Viktor Nilsson](/maintainers/kayson)[@kayson](https://github.com/kayson)

---

Top Contributors

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

---

Tags

filesystemlaravellumenaliyun-oss

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/packages/league-flysystem-aws-s3-v3)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[iidestiny/flysystem-oss

Flysystem adapter for the Oss storage.

96640.6k29](/packages/iidestiny-flysystem-oss)[jerodev/flysystem-v3-smb-adapter

SMB adapter for Flysystem v3

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

Laravel Cloudinary filesystem cloud driver.

3345.6k](/packages/yoelpc4-laravel-cloudinary)[luoyy/ali-oss-storage

aliyun oss filesystem storage for laravel 10+

1431.0k1](/packages/luoyy-ali-oss-storage)

PHPackages © 2026

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