PHPackages                             alphasnow/aliyun-oss-thinkphp - 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. alphasnow/aliyun-oss-thinkphp

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

alphasnow/aliyun-oss-thinkphp
=============================

aliyun oss filesystem storage for thinkphp 6

1.1.0(5y ago)12403MITPHPPHP &gt;=7.1.0

Since Mar 25Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (3)Used By (0)

Aliyun-oss-filesystem for ThinkPHP
==================================

[](#aliyun-oss-filesystem-for-thinkphp)

[![Latest Stable Version](https://camo.githubusercontent.com/d0bc71148122c613f6bcb2d3972438b69c124974aa975e687f1e4eed4624bd0f/68747470733a2f2f706f7365722e707567782e6f72672f616c706861736e6f772f616c6979756e2d6f73732d7468696e6b7068702f762f737461626c65)](https://packagist.org/packages/alphasnow/aliyun-oss-thinkphp)[![License](https://camo.githubusercontent.com/f43fe443f8e57df069a77b08ef73e9d7f00f607c940fd01577ccb7dffbb51255/68747470733a2f2f706f7365722e707567782e6f72672f616c706861736e6f772f616c6979756e2d6f73732d7468696e6b7068702f6c6963656e7365)](https://packagist.org/packages/alphasnow/aliyun-oss-thinkphp)[![Build Status](https://camo.githubusercontent.com/7873d960253f8db5f862b671c969f2e89169b149e12d70115e3d989f84bab3f8/68747470733a2f2f7472617669732d63692e636f6d2f616c706861736e6f772f616c6979756e2d6f73732d7468696e6b7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/alphasnow/aliyun-oss-thinkphp)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/505214f0a068dd4204e6ac8a7b23cdf0a2fa2f8e21eda8836bed28635f3cb5f7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c706861736e6f772f616c6979756e2d6f73732d7468696e6b7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alphasnow/aliyun-oss-thinkphp/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/26624e4eb5b09809400022b49eafad43dd5d9f51b4d8c6b2a7c100b39310420e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c706861736e6f772f616c6979756e2d6f73732d7468696e6b7068702f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alphasnow/aliyun-oss-thinkphp/?branch=master)

扩展借鉴了一些优秀的代码，综合各方，同时做了更多优化，将会添加更多完善的接口和插件，打造ThinkPHP最好的OSS Filesystem扩展

运行环境
----

[](#运行环境)

- PHP 7.0+
- cURL extension
- ThinkPHP 6.0+

安装方法
----

[](#安装方法)

1. 如果您通过composer管理您的项目依赖，可以在你的项目根目录运行：

    ```
     $ composer require alphasnow/aliyun-oss-thinkphp

    ```

    或者在你的`composer.json`中声明依赖：

    ```
     "require": {
         "alphasnow/aliyun-oss-thinkphp": "~1.0"
     }

    ```
2. 修改环境文件`.env`

    ```
    ALIYUN_OSS_ACCESS_ID=
    ALIYUN_OSS_ACCESS_KEY=
    ALIYUN_OSS_BUCKET=
    ALIYUN_OSS_ENDPOINT=oss-cn-shanghai.aliyuncs.com
    ALIYUN_OSS_IS_CNAME=false
    ALIYUN_OSS_CDN_DOMAIN=
    ALIYUN_OSS_IS_SSL=false

    ```

快速使用
----

[](#快速使用)

#### 文件上传

[](#文件上传)

```
use think\facade\Filesystem;
$file = request()->file('image');
$savename = Filesystem::disk('aliyun')->putFile( 'image', $file);
```

> [https://www.kancloud.cn/manual/thinkphp6\_0/1037639](https://www.kancloud.cn/manual/thinkphp6_0/1037639)

#### 文件写入

[](#文件写入)

```
use think\facade\Filesystem;
$filesystem = Filesystem::disk('aliyun');

$filesystem->write('prefix/path/file.txt',file_get_contents('/local/path/file.txt'));
```

> [阿里云OSS文档](https://help.aliyun.com/document_detail/32099.html?spm=5176.doc31981.6.335.eqQ9dM)

License
-------

[](#license)

See [LICENSE](LICENSE).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

1868d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90877a466dd664c9a6b4ccd2a9ccf46e54427307198fa11201976aac968f5fca?d=identicon)[alphasnow](/maintainers/alphasnow)

---

Top Contributors

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

---

Tags

aliyunaliyun-ossfilesystemossthinkphpstoragefilesystemsaliyunossthinkphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alphasnow-aliyun-oss-thinkphp/health.svg)

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

###  Alternatives

[jacobcyl/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

523566.2k7](/packages/jacobcyl-ali-oss-storage)[alphasnow/aliyun-oss-laravel

alibaba cloud object storage service for laravel

182240.7k2](/packages/alphasnow-aliyun-oss-laravel)[summergeorge/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

3915.5k](/packages/summergeorge-ali-oss-storage)[luoyy/ali-oss-storage

aliyun oss filesystem storage for laravel 9+

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

PHPackages © 2026

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