PHPackages                             liuwave/think-filesystem-driver-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. liuwave/think-filesystem-driver-oss

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

liuwave/think-filesystem-driver-oss
===================================

这是一个基于阿里云对象存储的thinkphp6.0 Filesystem驱动

v2.0.0(3y ago)1183MITPHPPHP &gt;=7.2.5

Since Jul 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/liuwave/think-filesystem-driver-oss)[ Packagist](https://packagist.org/packages/liuwave/think-filesystem-driver-oss)[ Docs](https://github.com/liuwave/think-filesystem-driver-oss)[ RSS](/packages/liuwave-think-filesystem-driver-oss/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (3)Versions (8)Used By (0)

think-filesystem-driver-oss
===========================

[](#think-filesystem-driver-oss)

这是一个基于阿里云对象存储的thinkphp6.0 Filesystem驱动，支持阿里云函数计算。

安装
--

[](#安装)

```
    composer require liuwave/think-filesystem-driver-oss
```

在`config/filesystem.php`中添加配置:

```
'oss' => [
    'type'         => \liuwave\think\filesystem\driver\Oss::class,
    'credentials'=>[//若为false,则使用函数计算 runtime context提供的 credentials
        'accessId'     => '******',
        'accessSecret' => '******',
    ],
    'bucket'       => 'bucket',
    'endpoint'     => 'oss-cn-hongkong.aliyuncs.com',
    'url'          => '//oss-test-for-all.oss-cn-beijing.aliyuncs.com'
],

```

oss访问权限
-------

[](#oss访问权限)

### 使用 函数计算 runtime context 提供的 credentials

[](#使用-函数计算-runtime-context-提供的-credentials)

函数计算的入口函数中需要将 context 绑定到 request header上。另外，需要在函数访问的服务中的服务配置中给对应角色授权 读写 对应的oss bucket。

相关文档

- [函数计算权限简介](https://help.aliyun.com/document_detail/52885.html)
- [liuwave/fc-thinkphp](https://github.com/liuwave/fc-thinkphp)
- [函数计算PHP运行环境](https://help.aliyun.com/document_detail/89032.html)

### 通用(同样适用于函数计算)

[](#通用同样适用于函数计算)

accessId对应的用户需要 对应的oss bucket访问授权。

相关文档

- [使用RAM对OSS进行权限管理](https://help.aliyun.com/knowledge_detail/58905.html)

使用
--

[](#使用)

```
//默认$file为单文件。$file为多文件时file为数组，需要进行遍历处理
$file=\request()->file('file');
$filesystem     = \think\facade\Filesystem::disk('oss');
$saveName       = $filesystem->putFile('/path/to/save/file', $file, 'md5');
$saveName       = str_replace('\\', '/', $saveName);
$fullName = \think\facade\Filesystem::getDiskConfig('oss', 'url').'/'.$saveName;
```

授权
--

[](#授权)

MIT

参考
--

[](#参考)

- thinkphp
- xxtime/flysystem-aliyun-oss

更多
--

[](#更多)

- [腾讯云liuwave/think-filesystem-driver-cos](https://github.com/liuwave/think-filesystem-driver-cos)
- [七牛云liuwave/think-filesystem-driver-kodo](https://github.com/liuwave/think-filesystem-driver-kodo)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Recently: every ~232 days

Total

7

Last Release

1203d ago

Major Versions

v0.0.1 → v1.0.02020-07-06

1.0.3 → v2.0.02023-01-24

PHP version history (2 changes)v0.0.1PHP &gt;=7.2.0

v2.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea0000cba67ced68f357012faa62e87dacfcf16716cf1a0bef43958da234ebb5?d=identicon)[liuwave](/maintainers/liuwave)

---

Top Contributors

[![liuwave](https://avatars.githubusercontent.com/u/6533126?v=4)](https://github.com/liuwave "liuwave (10 commits)")

---

Tags

filesystemossthink-filesystem-driver-oss

### Embed Badge

![Health badge](/badges/liuwave-think-filesystem-driver-oss/health.svg)

```
[![Health](https://phpackages.com/badges/liuwave-think-filesystem-driver-oss/health.svg)](https://phpackages.com/packages/liuwave-think-filesystem-driver-oss)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

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

Symfony bundle integrating Flysystem into Symfony applications

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

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-async-aws-s3

AsyncAws S3 filesystem adapter for Flysystem.

2610.5M31](/packages/league-flysystem-async-aws-s3)[alphasnow/aliyun-oss-flysystem

Flysystem adapter for the Aliyun storage

14249.2k4](/packages/alphasnow-aliyun-oss-flysystem)

PHPackages © 2026

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