PHPackages                             qgmac/cloud\_object\_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. qgmac/cloud\_object\_storage

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

qgmac/cloud\_object\_storage
============================

云对象存储集成客户端

0.1.5(1y ago)246MITPHP

Since Jul 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/qgmac/cloud_object_storage)[ Packagist](https://packagist.org/packages/qgmac/cloud_object_storage)[ RSS](/packages/qgmac-cloud-object-storage/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (6)Versions (8)Used By (0)

 cloud\_object\_storage
========================

[](#-cloud_object_storage-)

 云对象存储集成客户端.

Installing
----------

[](#installing)

```
$ composer require qgmac/cloud_object_storage -vvv
```

Usage
-----

[](#usage)

```
$config = [
        'default' => 'cos',//默认
        'disks' => [
            'cos' => [// 腾讯云
                'driver' => 'cos',
                'secret_id' => '',
                'secret_key' => '',
                'region' => '',
                'bucket' => '',
                'url' => '',
            ],
            'obs' => [// 华为云
                'driver' => 'obs',
                'key' => '',
                'secret' => '',
                'bucket' => '',
                'url' => '',
                'endpoint' => '',
            ],
            'oss' => [// 阿里云
                'driver' => 'obs',
                'key' => '',
                'secret' => '',
                'role_arn' => '',//即需要扮演的角色ID，格式为acs:ram::$accountID:role/$roleName
                'bucket' => '',
                'url' => '',
                'endpoint' => '',
            ],
             'ftp' => [
                'driver' => 'ftp',
                'host' => '',
                'port' => 21,
                'username' => '',
                'password' => '',
                'url' => '',
                'timeout' => 5,
            ],
        ],
    ];

$store_key = "/test/test.jpg";
$manager = new Manager($config);
$default_store_url = $manager->store()->uploadFile($_file, $head_url);

$cos_url = $manager->store('cos')->uploadFile($_file, $head_url);
$obs_url = $manager->store('obs')->uploadFile($_file, $head_url);
$oss_url = $manager->store('oss')->uploadFile($_file, $head_url);
$oss_url = $manager->store('ftp')->uploadFile($_file, $head_url);
$manager->store('cos')->deleteFile($store_key) bool;
$manager->store('cos')->getFileUrl($store_key) string;
$manager->store('cos')->exist($store_key) bool;
```

ps [OSS配置参考](https://help.aliyun.com/zh/oss/developer-reference/oss-php-configure-access-credentials?spm=a2c4g.11186623.0.0.1adb5d0fKxW76R#9a510df0f0i8d):使用长期访问凭证

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/qgmac/cloud_object_storage/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/qgmac/cloud_object_storage/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance44

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

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

Recently: every ~66 days

Total

7

Last Release

442d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21d043a81470d0bbf6609cf413e1ba08435b2669b2babca67f5f51620a396f72?d=identicon)[qgmac](/maintainers/qgmac)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/qgmac-cloud-object-storage/health.svg)

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

###  Alternatives

[iidestiny/flysystem-oss

Flysystem adapter for the Oss storage.

96640.6k29](/packages/iidestiny-flysystem-oss)[luoyy/ali-oss-storage

aliyun oss filesystem storage for laravel 10+

1531.0k1](/packages/luoyy-ali-oss-storage)

PHPackages © 2026

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