PHPackages                             sessel/thinkphp-oss-filesystem - 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. sessel/thinkphp-oss-filesystem

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

sessel/thinkphp-oss-filesystem
==============================

oss filesystem for thinkphp

v2.0.1(7mo ago)029MITPHPPHP &gt;=8.0

Since Oct 14Pushed 6mo agoCompare

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

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

Object Storage filesystem for ThinkPHP
======================================

[](#object-storage-filesystem-for-thinkphp)

Thinkphp对象存储Filesystem扩展, 基于 `topthink/think-filesystem`

安装
--

[](#安装)

```
# ThinkPHP 6.x
composer require sessel/thinkphp-oss-filesystem:^1.0

# ThinkPHP 8.x
composer require sessel/thinkphp-oss-filesystem:^2.0

```

配置
--

[](#配置)

```
# config/filesystem.php
...
//阿里云OSS
'aliyun' => [
    'type' => 'aliyun',
    'region' => 'region',
    'bucket' => 'bucket',
    'access_key_id' => 'access_key_id',
    'access_key_secret' => 'access_key_secret',
    'security_token' => null,
    'endpoint' => 'endpoint',
    'use_ssl' => true,
    'prefix' => 'prefix',
    'url' => '',
    'cdn_url' => '',
    'ram_role_arn' => 'ram_role_arn',
    'error_handler' => null,
]
//火山云TOS
'vetos' => [
    'type' => 'vetos',
    'ak' => 'ak',
    'sk' => 'sk',
    'region' => 'region',
    'bucket' => 'bucket',
    'prefix' => 'prefix',
    'domain' => 'custom domain',
    'endpoint' => 'https://xxx/',
],
...

```

示例
--

[](#示例)

```
use think\facade\Filesystem;
use GuzzleHttp\Psr7\Utils;

$disk = Filesystem::disk('aliyun');
// $gen = $disk->listContents('/');
// $files = [];
// foreach($gen as $file){
//     $files[] = $file;
// }
// halt($files);
// halt($disk->url('/php.png'));
// halt($disk->has('/php.png'));
// halt($disk->has('/php2.png'));
// halt($disk->copy('/php2.png', 'php3.png'));
// halt($disk->delete('/php3.png'));
// halt($disk->read('/test.txt'));
// halt($disk->createDirectory('test'));
// halt($disk->fileExists('php5.png'));
// halt($disk->write('test.txt', '222');
// $content = '';
// for ($i = 0; $i < 20000; $i++) {
//     $content .= uniqid();
// }
// $veTosAdapter = app('oss.volcengine', ['config' => config('filesystem.disks.oss')]);
// $veTosAdapter = $disk->getAdapter();
// halt($veTosAdapter->appendWrite('test_append2.txt', $content, new Config(['next_append_offset' => 260000])));
// halt($disk->visibility('test.txt'));
// halt($disk->fileSize('test_append.txt'));
// halt($disk->mimeType('test_append.txt'));
// halt($disk->lastModified('test_append.txt'));
// halt($disk->read('test_append.txt'));
// $readStream = $disk->readStream('test_append.txt');
// $writeStream = fopen(public_path('static') . 'test_append.txt', 'w+');
// Utils::copyToStream(Utils::streamFor($readStream), Utils::streamFor($writeStream));

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance65

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Total

2

Last Release

202d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13fa4403ef072d203da95079e8db06e791cbe42e8b87a0b87ef96e677adcfd07?d=identicon)[sessel](/maintainers/sessel)

---

Top Contributors

[![sessel](https://avatars.githubusercontent.com/u/5648781?v=4)](https://github.com/sessel "sessel (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sessel-thinkphp-oss-filesystem/health.svg)

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

###  Alternatives

[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[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)
