xplqcloud/cos
最新稳定版本:v0.1.2
Composer 安装命令:
composer require xplqcloud/cos
包简介
yii2上传文件到腾讯云对象存储组件
关键字:
README 文档
README
yii2上传文件到腾讯云对象存储组件
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require xplqcloud/cos
or add
"xplqcloud/cos": "*"
to the require section of your composer.json.
Configuration
To use this extension, simply add the following code in your application configuration:
return [ //.... 'components' => [ 'cos'=>[ 'class'=>'xplqcloud\cos\Cos', 'app_id' => 'app_id', 'secret_id' => 'secret_id', 'secret_key' => 'secret_key', 'region' => 'region', 'bucket'=>'bucket', 'insertOnly'=>true, 'timeout' => 200 ], ], ];
[操作说明]
//上传文件
\Yii::$app->cos->upload($src, $dst);
//删除文件
\Yii::$app->cos->delFile($dst);
//创建文件夹
\Yii::$app->cos->delFolder($folder);
//删除文件夹
\Yii::$app->cos->delFile($folder);
//获取文件夹列表
\Yii::$app->cos->listFolder($folder);
统计信息
- 总下载量: 259
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-25