PHPackages                             swoft-components/cloud-storage - 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. swoft-components/cloud-storage

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

swoft-components/cloud-storage
==============================

cloud storage component for swoft, now support qiniu cloud storage

v2.0.2(1y ago)0197Apache-2.0PHPPHP &gt;=7.4

Since May 16Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/swoft-components/cloud-storage)[ Packagist](https://packagist.org/packages/swoft-components/cloud-storage)[ Docs](https://github.com/swoft-components/cloud-storage)[ RSS](/packages/swoft-components-cloud-storage/feed)WikiDiscussions master Synced 1mo ago

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

Swoft Cloud Storage
===================

[](#swoft-cloud-storage)

intro
-----

[](#intro)

This component is a cloud storage component for swoft. Current version 2.0.1, support qiniu cloud storage.

Install
-------

[](#install)

- composer command

```
composer require swoft/cloud-storage
```

LICENSE
-------

[](#license)

The Component is open-sourced software licensed under the [Apache license](LICENSE).

Usage
-----

[](#usage)

```
    // bean.php 中配置 bean 定义
    // accessKey, secretKey 可以在 qiniu 个人中心获取, bucket 是七牛的空间名称

    return [
        ...
        'qiniu' => [
            'bucket' => '配置七牛bucket名称'
        ],
        'qiniuAuth' => [
            'accessKey' => '配置授权秘钥 key',
            'secretKey' => '配置授权秘钥 secret',
        ],
        ...
    ];
```

```
    // 上传文件到七牛云
    use Swoft\CloudStorage\CloudStorage;
    use Swoft\CloudStorage\CloudStorageType;

    $cloudFileName = 'test.jpg';
    $localFilePath = __DIR__. DIRECTORY_SEPARATOR. 'test.jpg';
    // upload file to cloud qiniu
    $result = CloudStorage::upload($cloudFileName, $localFilePath, CloudStorageType::QINIU);
    var_dump($result);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance51

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

2

Last Release

331d ago

Major Versions

v2.0.2 → v3.0.0-beta2025-06-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/498a610f6038258ab3ad1399afa3cf2a65ee6b3372471898c9106af5bd3a2778?d=identicon)[liujiekkk](/maintainers/liujiekkk)

---

Top Contributors

[![liujiekkk](https://avatars.githubusercontent.com/u/14047843?v=4)](https://github.com/liujiekkk "liujiekkk (14 commits)")

---

Tags

phpswooleqiniucloud-storageswoftswoft-components

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/swoft-components-cloud-storage/health.svg)

```
[![Health](https://phpackages.com/badges/swoft-components-cloud-storage/health.svg)](https://phpackages.com/packages/swoft-components-cloud-storage)
```

###  Alternatives

[swoft/swoft

Modern High performance AOP and Coroutine PHP Framework

5.5k34.5k](/packages/swoft-swoft)[swoft/db

swoft database component

24167.4k11](/packages/swoft-db)[swoft/websocket-server

swoft websocket server component

16134.1k5](/packages/swoft-websocket-server)[swoft/redis

swoft redis component

12168.4k16](/packages/swoft-redis)[swoft/http-server

swoft http server component

11174.5k8](/packages/swoft-http-server)[swoft/http-client

HTTP Client Component for Swoft

1139.3k4](/packages/swoft-http-client)

PHPackages © 2026

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