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

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

virtual-cloud/storage
=====================

阿里云、七牛云、腾讯云简单文件上传，删除

215PHP

Since Nov 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gandebucuo/virtual-storage)[ Packagist](https://packagist.org/packages/virtual-cloud/storage)[ RSS](/packages/virtual-cloud-storage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

前言
==

[](#前言)

###### 由于个人实际开发中使用官方SDK云存储，大部分扩展功能都未使用到，因此开发此简约版文件上传、删除功能，方面后续使用；若后续需要其他功能，将继续扩展。

[](#由于个人实际开发中使用官方sdk云存储大部分扩展功能都未使用到因此开发此简约版文件上传删除功能方面后续使用若后续需要其他功能将继续扩展)

安装
==

[](#安装)

#### 使用composer命令直接安装

[](#使用composer命令直接安装)

```
composer require virtual-cloud/storage

```

#### 或在composer.json添加包名后，执行composer install安装

[](#或在composerjson添加包名后执行composer-install安装)

```
{
    "require": {
        "virtual-cloud/storage": "dev-main"
    }
}

```

使用方法
====

[](#使用方法)

#### 文件上传/删除

[](#文件上传删除)

```
use VirtualCloud\Init;
...
    //云存储生成文件名称
    $fileName = 'cloud/test.png';

    //上传文件，临时地址
    $filePath = $_FILES['file']['tmp_name'];

    $config   =  [
        'access_key_id'     => 'LTAI5t****EL4i9R6',
        'access_key_secret' => '2Ta711***mYXwF333',
        'bucket'            => 'xi**un',
        'domain'            => 'oss***.aliyuncs.com',
    ];

    // Ali      阿里云
    // Tencent  腾讯云
    // QiNiu    七牛云
    $new    = Init::make(Ali,$config,$fileName,$filePath);
    //上传文件
    $result = $new->uploadFile();
    //删除文件
    $result = $new->deleteFile();
...

```

#### $config 配置参数说明

[](#config-配置参数说明)

```
//阿里云
$congig = [
    'access_key_id'     => 'LTAI5t****EL4i9R6',
    'access_key_secret' => '2Ta711***mYXwF333',
    'bucket'            => 'xi**un',
    'domain'            => 'oss***.aliyuncs.com',
]

//七牛云
$config = [
    'ak'       => '3Kt9gz****z7KnM',
    'sk'       => 'WjQlby****gzDBAmn',
    'bucket'   => 'vi***oud',
    'domain'   => 'ry6by***uddn.com',
    'area'     => 'http://up-z2.qiniup.com'  //https://developer.qiniu.com/kodo/1671/region-endpoint-fq 根据存储区域；选择上传域名
]

//腾讯云
$config = [
   'secret_id'    => 'AKIDP9***FcHwP',
   'secret_key'   => 'YCg1zq***Sp0fQ',
   'bucket'       => 'vi***-1****200',
   'domain'       => 'cos.****loud.com',
]

```

联系我们
====

[](#联系我们)

如需丰富扩展/其他业务/建议，请直接向 发送邮箱；或添加微信，请说明来意奥

[![个人微信](https://camo.githubusercontent.com/b296d316ef4c3a14bc61abb850d465936db7d5ef02cc6d1c5584655717f898e0/687474703a2f2f7869616f6e6172756e2e6f73732d636e2d6265696a696e672e616c6979756e63732e636f6d2f77782e6a70673f782d6f73732d70726f636573733d696d6167652f726573697a652c6d5f66697865642c685f3334302c775f333030)](https://camo.githubusercontent.com/b296d316ef4c3a14bc61abb850d465936db7d5ef02cc6d1c5584655717f898e0/687474703a2f2f7869616f6e6172756e2e6f73732d636e2d6265696a696e672e616c6979756e63732e636f6d2f77782e6a70673f782d6f73732d70726f636573733d696d6167652f726573697a652c6d5f66697865642c685f3334302c775f333030)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/963a3d83665d03a86359f718ae6435e0a0bae11f09719b607457385cf3aa5b28?d=identicon)[gandebucuo](/maintainers/gandebucuo)

---

Top Contributors

[![gandebucuo](https://avatars.githubusercontent.com/u/54588631?v=4)](https://github.com/gandebucuo "gandebucuo (13 commits)")

### Embed Badge

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

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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