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

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

coolxitech/flysystem-aliyun-oss
===============================

AliYun OSS adapter for flysystem. Support PHP8. aliyuncs/oss-sdk-php ~2.6

00PHP

Since Dec 16Pushed 4mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Aliyun OSS Adapter For Flysystem.
---------------------------------

[](#aliyun-oss-adapter-for-flysystem)

[![Latest Stable Version](https://camo.githubusercontent.com/39a16cdb3b1e06ba31818853b4c7a6e7e27221378ae3605e83e8dd4f0a6d31ec/68747470733a2f2f706f7365722e707567782e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f762f737461626c65)](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[![Build Status](https://camo.githubusercontent.com/51ce9de00d43a7bd6c2a341598016bd952cf719974ab27c1836607f5a2f5e7f3/68747470733a2f2f7472617669732d63692e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xxtime/flysystem-aliyun-oss)[![Total Downloads](https://camo.githubusercontent.com/e5651f98154fc655d0840777c0379b463da25b85dcbb1bd7e1b644418f774716/68747470733a2f2f706f7365722e707567782e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f646f776e6c6f616473)](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[![License](https://camo.githubusercontent.com/e627d05fe77551b5494274e60967024e5bbab47d330823c12b4502dc0aeb1383/68747470733a2f2f706f7365722e707567782e6f72672f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f6c6963656e7365)](https://packagist.org/packages/xxtime/flysystem-aliyun-oss)[![Author](https://camo.githubusercontent.com/c98d4fe6bdaf1e53098bedf58e5c6c09dad29a2aa734501226fc037acc57b075/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d4a6f652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.xxtime.com)[![Code Climate](https://camo.githubusercontent.com/c771691b4574096cefabee726fdd5ecf9484e3a2ebba4f21aa00a88838daf962/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f787874696d652f666c7973797374656d2d616c6979756e2d6f73732f6261646765732f6770612e737667)](https://codeclimate.com/github/xxtime/flysystem-aliyun-oss)

AliYun OSS Storage adapter for flysystem - a PHP filesystem abstraction.

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

[](#installation)

composer require xxtime/flysystem-aliyun-oss

Logs
----

[](#logs)

##### 1.3.0

[](#130)

1. some args name changed
2. default region oss-cn-hangzhou

##### 1.7.0

[](#170)

1. support flysystem v3
2. support oss-sdk-php 2.6
3. support PHP8

Usage
-----

[](#usage)

```
use League\Flysystem\Filesystem;
use Xxtime\Flysystem\Aliyun\OssAdapter;

$aliyun = new OssAdapter([
    'accessId'       => '',
    'accessSecret'   => '',
    'bucket'         => '',
    'endpoint'       => '',
    // 'timeout'        => 3600,
    // 'connectTimeout' => 10,
    // 'isCName'        => false,
    // 'token'          => '',
]);
$filesystem = new Filesystem($aliyun);

// Write Files
$filesystem->write('path/to/file.txt', 'contents');
// get RAW data from aliYun OSS
$raw = $aliyun->supports->getFlashData();

// Write Use writeStream
$stream = fopen('local/path/to/file.txt', 'r+');
$filesystem->writeStream('path/to/file.txt', $stream);

// Update Files
$filesystem->update('path/to/file.txt', 'new contents');

// Check if a file exists
$exists = $filesystem->has('path/to/file.txt');

// Read Files
$contents = $filesystem->read('path/to/file.txt');

// Delete Files
$filesystem->delete('path/to/file.txt');

// Rename Files
$filesystem->rename('filename.txt', 'newname.txt');

// Copy Files
$filesystem->copy('filename.txt', 'duplicate.txt');

// list the contents (not support recursive now)
$filesystem->listContents('path', false);
```

```
// 说明：此方法返回从阿里云接口返回的原生数据，仅可调用一次
// DESC: this function return AliYun RAW data
$raw = $aliyun->supports->getFlashData();
```

Document
--------

[](#document)

1. [Region And Endpoint Table](https://help.aliyun.com/document_detail/31837.html)
2. [Aliyun OSS PHP SDK Document](https://help.aliyun.com/document_detail/85580.html)

Reference
---------

[](#reference)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance50

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/981846f6fe4479b67f3441b60beafc242be58290be71b1445bef2646018dd145?d=identicon)[coolxitech](/maintainers/coolxitech)

---

Top Contributors

[![coolxitech](https://avatars.githubusercontent.com/u/20185794?v=4)](https://github.com/coolxitech "coolxitech (2 commits)")[![limingxinleo](https://avatars.githubusercontent.com/u/16648551?v=4)](https://github.com/limingxinleo "limingxinleo (2 commits)")[![53caiyu](https://avatars.githubusercontent.com/u/14135790?v=4)](https://github.com/53caiyu "53caiyu (1 commits)")[![JoeByte](https://avatars.githubusercontent.com/u/4596910?v=4)](https://github.com/JoeByte "JoeByte (1 commits)")

### Embed Badge

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

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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