PHPackages                             yangweijie/think-filesystem-driver-github - 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. yangweijie/think-filesystem-driver-github

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

yangweijie/think-filesystem-driver-github
=========================================

github think-filesystem 驱动

v1.0.2(1y ago)011Apache-2.0PHP

Since Jul 8Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

think-filesystem-driver-github
==============================

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

ThinkPHP 的github 文件系统驱动，可以将一个仓库作为文件库

安装
--

[](#安装)

```
composer require yangweijie/think-filesystem-driver-github
```

使用
--

[](#使用)

配置 token 需 开发着自己去 github 里 配置

```
'github'=>[
    'type'=>'github',
    'branch'=>'main', // main 可以不配，master 等可以配置一下
    'token'=>Env::get('filesystem.GITHUB_ACCESS_TOKEN', ''),
    'username'=>'username',
    'repository'=>'repository',
    'hostIndex'  => 'jsdelivr', // 目前支持 github 、 jsdelivr 、 fastgit
],
```

### 本地文件上传

[](#本地文件上传)

```
$file = public_path().'favicon.ico';
$githubDisk = Filesystem::disk('github');
if(!$githubDisk->has('favicon.ico')){
    $ret = $githubDisk->put('favicon.ico', file_get_contents($file));
}
$url = $githubDisk->url('favicon.ico');
// https://cdn.jsdelivr.net/gh/username/repository@main/favicon.ico

```

### 表单上传

[](#表单上传)

```
// 获取表单上传文件 例如上传了001.jpg
$file = request()->file('image');
// 上传到本地服务器
$savename = \think\facade\Filesystem::disk('github')->putFile( 'topic', $file);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Total

3

Last Release

680d ago

### Community

Maintainers

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

---

Top Contributors

[![yangweijie](https://avatars.githubusercontent.com/u/1614114?v=4)](https://github.com/yangweijie "yangweijie (5 commits)")

### Embed Badge

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

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

###  Alternatives

[thans/thinkphp-filesystem-cloud

thinkphp6.0 filesystem,include Aliyun and Qiniu

2237.8k3](/packages/thans-thinkphp-filesystem-cloud)[yzh52521/think-filesystem

thinkphp6.1 for filesystem,include Aliyun and Qiniu COS OBS

113.8k](/packages/yzh52521-think-filesystem)

PHPackages © 2026

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