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

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

liuwave/think-filesystem-driver-cos
===================================

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

v0.0.1(5y ago)128MITPHPPHP &gt;=7.2.0

Since Jul 6Pushed 5y ago1 watchersCompare

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

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

think-filesystem-driver-cos
===========================

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

这是一个基于腾讯云对象存储的thinkphp6.0 Filesystem驱动。

安装
--

[](#安装)

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

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

```
    'cos' => [
      'type'            => \liuwave\filesystem\driver\Cos::class ,
      'region'          => '***', //bucket 所属区域 英文
      'appId'           => '***', // 域名中数字部分
      'secretId'        => '***',
      'secretKey'       => '***',
      'bucket'          => '***',
      'timeout'         => 60,
      'connect_timeout' => 60,
      'cdn'             => '您的 CDN 域名',
      'scheme'          => 'https',
      'read_from_cdn'   => false,
      'url'       => '',//访问域名
    ],

```

使用
--

[](#使用)

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

授权
--

[](#授权)

MIT

参考
--

[](#参考)

- thinkphp
- overtrue/flysystem-cos
- [腾讯云对象存储](https://cloud.tencent.com/document/product/436)

更多
--

[](#更多)

- [阿里云liuwave/think-filesystem-driver-oss](https://github.com/liuwave/think-filesystem-driver-oss)
- [七牛云liuwave/think-filesystem-driver-kodo](https://github.com/liuwave/think-filesystem-driver-kodo)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

2136d ago

### 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 (4 commits)")

---

Tags

filesystemcosthink-filesystem-driver-cos

### Embed Badge

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

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

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

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

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72528.6M91](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

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

PHPackages © 2026

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