PHPackages                             hihuangwei/flysystem-qiniu - 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. hihuangwei/flysystem-qiniu

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

hihuangwei/flysystem-qiniu
==========================

Flysystem adapter for the Qiniu storage.

2.0.0(4y ago)16MITPHPPHP &gt;=7.2

Since Mar 14Pushed 4y agoCompare

[ Source](https://github.com/hihuangwei/flysystem-qiniu)[ Packagist](https://packagist.org/packages/hihuangwei/flysystem-qiniu)[ GitHub Sponsors](https://github.com/overtrue)[ RSS](/packages/hihuangwei-flysystem-qiniu/feed)WikiDiscussions master Synced 1mo ago

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

Flysystem Qiniu
===============

[](#flysystem-qiniu)

💾 Flysystem adapter for the Qiniu storage.

[![Build Status](https://camo.githubusercontent.com/30d8a8d826c10330a6f2581fecfada193200bc29733de6a8ea522ee9037915fb/68747470733a2f2f7472617669732d63692e6f72672f6f766572747275652f666c7973797374656d2d71696e69752e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/overtrue/flysystem-qiniu)[![Latest Stable Version](https://camo.githubusercontent.com/e60c0b65119cdeccebdfec3eeb33e833ce1a583979365d6fa4c2e0b1c4bb4000/68747470733a2f2f706f7365722e707567782e6f72672f6f766572747275652f666c7973797374656d2d71696e69752f762f737461626c652e737667)](https://packagist.org/packages/overtrue/flysystem-qiniu)[![Latest Unstable Version](https://camo.githubusercontent.com/8cc646d0547e5fe4f5c945d9d8e2a600e8e5622ee57b37110c5fe2896458ffb0/68747470733a2f2f706f7365722e707567782e6f72672f6f766572747275652f666c7973797374656d2d71696e69752f762f756e737461626c652e737667)](https://packagist.org/packages/overtrue/flysystem-qiniu)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6525f424063336bb7812dab0f79365985820b15f76f19509e2f54f87364b6adf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f766572747275652f666c7973797374656d2d71696e69752f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/overtrue/flysystem-qiniu/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ed992d09fdd25dd7511e819da7f4bcffbf90006cbaa092b794b441c3626c0d5c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f766572747275652f666c7973797374656d2d71696e69752f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/overtrue/flysystem-qiniu/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/11bb3cf070a946d709a1b2270f755fcc1a1e46e47c32ba2c4a642a04c181e47f/68747470733a2f2f706f7365722e707567782e6f72672f6f766572747275652f666c7973797374656d2d71696e69752f646f776e6c6f616473)](https://packagist.org/packages/overtrue/flysystem-qiniu)[![License](https://camo.githubusercontent.com/6fc5bb26d1babbcbe0a85e9669d409bc575652012b03816b74fa1a2cccdd9437/68747470733a2f2f706f7365722e707567782e6f72672f6f766572747275652f666c7973797374656d2d71696e69752f6c6963656e7365)](https://packagist.org/packages/overtrue/flysystem-qiniu)

[![Sponsor me](https://github.com/overtrue/overtrue/raw/master/sponsor-me-button-s.svg?raw=true)](https://github.com/sponsors/overtrue)

Requirement
===========

[](#requirement)

- PHP &gt;= 5.5.9

Installation
============

[](#installation)

```
$ composer require "overtrue/flysystem-qiniu" -vvv
```

Usage
=====

[](#usage)

```
use League\Flysystem\Filesystem;
use Overtrue\Flysystem\Qiniu\QiniuAdapter;
use Overtrue\Flysystem\Qiniu\Plugins\FetchFile;

$accessKey = 'xxxxxx';
$secretKey = 'xxxxxx';
$bucket = 'test-bucket-name';
$domain = 'xxxx.bkt.clouddn.com'; // or with protocol: https://xxxx.bkt.clouddn.com

$adapter = new QiniuAdapter($accessKey, $secretKey, $bucket, $domain);

$flysystem = new League\Flysystem\Filesystem($adapter);
```

API
---

[](#api)

```
bool $flysystem->write('file.md', 'contents');

bool $flysystem->write('file.md', 'http://httpbin.org/robots.txt', ['mime' => 'application/redirect302']);

bool $flysystem->writeStream('file.md', fopen('path/to/your/local/file.jpg', 'r'));

bool $flysystem->update('file.md', 'new contents');

bool $flysystem->updateStream('file.md', fopen('path/to/your/local/file.jpg', 'r'));

bool $flysystem->rename('foo.md', 'bar.md');

bool $flysystem->copy('foo.md', 'foo2.md');

bool $flysystem->delete('file.md');

bool $flysystem->has('file.md');

string|false $flysystem->read('file.md');

array $flysystem->listContents();

array $flysystem->getMetadata('file.md');

int $flysystem->getSize('file.md');

string $flysystem->getAdapter()->getUrl('file.md');

string $flysystem->getMimetype('file.md');

int $flysystem->getTimestamp('file.md');
```

### Plugins

[](#plugins)

File Url:

```
use Overtrue\Flysystem\Qiniu\Plugins\FileUrl;

$flysystem->addPlugin(new FileUrl());

string $flysystem->getUrl('file.md');
```

Fetch file:

```
use Overtrue\Flysystem\Qiniu\Plugins\FetchFile;

$flysystem->addPlugin(new FetchFile());

bool $flysystem->fetch('file.md', 'http://httpbin.org/robots.txt');
```

Upload Token:

```
use Overtrue\Flysystem\Qiniu\Plugins\UploadToken;
$flysystem->addPlugin(new UploadToken());

string $flysystem->getUploadToken('file.md', 3600);
```

File private download Url:

```
use Overtrue\Flysystem\Qiniu\Plugins\PrivateDownloadUrl;

$flysystem->addPlugin(new PrivateDownloadUrl());

string $flysystem->privateDownloadUrl('file.md');
```

Integration
===========

[](#integration)

- Laravel 5: [overtrue/laravel-filesystem-qiniu](https://github.com/overtrue/laravel-filesystem-qiniu)
- Yii2: [krissss/yii2-filesystem-qiniu](https://github.com/krissss/yii2-filesystem-qiniu)

❤️ Sponsor me
-------------

[](#heart-sponsor-me)

[![Sponsor me](https://github.com/overtrue/overtrue/raw/master/sponsor-me.svg?raw=true)](https://github.com/sponsors/overtrue)

如果你喜欢我的项目并想支持它，[点击这里 ❤️](https://github.com/sponsors/overtrue)

Project supported by JetBrains
------------------------------

[](#project-supported-by-jetbrains)

Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.

[![](https://camo.githubusercontent.com/3cf726e7cdadba47755b7f7ea4227945a92a2fa48aadf4a2573140ec6501c989/68747470733a2f2f7265736f75726365732e6a6574627261696e732e636f6d2f73746f726167652f70726f64756374732f636f6d70616e792f6272616e642f6c6f676f732f6a625f6265616d2e737667)](https://www.jetbrains.com/?from=https://github.com/overtrue)

PHP 扩展包开发
---------

[](#php-扩展包开发)

> 想知道如何从零开始构建 PHP 扩展包？
>
> 请关注我的实战课程，我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package)

License
=======

[](#license)

MIT

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 63.1% 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 ~143 days

Recently: every ~173 days

Total

12

Last Release

1770d ago

Major Versions

0.0.4 → 1.0.02017-08-25

1.x-dev → 2.0.02021-07-07

PHP version history (2 changes)0.0.1PHP &gt;=5.5.9

2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/88077af0f824ce69160ed2c52077502f9e013c64e121cd8d5d880bbf99afafd3?d=identicon)[hihuangwei](/maintainers/hihuangwei)

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (53 commits)")[![robberphex](https://avatars.githubusercontent.com/u/1926185?v=4)](https://github.com/robberphex "robberphex (6 commits)")[![loktarjugg](https://avatars.githubusercontent.com/u/3970144?v=4)](https://github.com/loktarjugg "loktarjugg (4 commits)")[![billyct](https://avatars.githubusercontent.com/u/1612364?v=4)](https://github.com/billyct "billyct (4 commits)")[![hihuangwei](https://avatars.githubusercontent.com/u/3166799?v=4)](https://github.com/hihuangwei "hihuangwei (3 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (3 commits)")[![limingxinleo](https://avatars.githubusercontent.com/u/16648551?v=4)](https://github.com/limingxinleo "limingxinleo (3 commits)")[![summerblue](https://avatars.githubusercontent.com/u/324764?v=4)](https://github.com/summerblue "summerblue (2 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (2 commits)")[![yesterday679](https://avatars.githubusercontent.com/u/11986820?v=4)](https://github.com/yesterday679 "yesterday679 (1 commits)")[![Hanson](https://avatars.githubusercontent.com/u/10583423?v=4)](https://github.com/Hanson "Hanson (1 commits)")[![krissss](https://avatars.githubusercontent.com/u/10680903?v=4)](https://github.com/krissss "krissss (1 commits)")[![aogg](https://avatars.githubusercontent.com/u/8998031?v=4)](https://github.com/aogg "aogg (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hihuangwei-flysystem-qiniu/health.svg)

```
[![Health](https://phpackages.com/badges/hihuangwei-flysystem-qiniu/health.svg)](https://phpackages.com/packages/hihuangwei-flysystem-qiniu)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

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

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[zgldh/qiniu-laravel-storage

Qiniu Resource (Cloud) Storage SDK for Laravel 5/6/7/8/9

530394.0k14](/packages/zgldh-qiniu-laravel-storage)[overtrue/flysystem-qiniu

Flysystem adapter for the Qiniu storage.

231891.2k58](/packages/overtrue-flysystem-qiniu)[yii2-starter-kit/yii2-file-kit

Yii2 file upload and storage kit

151216.8k6](/packages/yii2-starter-kit-yii2-file-kit)

PHPackages © 2026

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