saviorlv/yii2-aliyun-oss Yii2 阿里云 OSS

extensionaliyunossoss

Yii2 阿里云 OSS

安装

composer require saviorlv/yii2-aliyun-oss -vvv

or add

"saviorlv/yii2-aliyun-oss":"^1.0"

使用

在 main.php 文件中做如下修改

components => [
    'oss' => [
        'class' => 'Saviorlv\Aliyun\OSS',
        'accessKeyId' => 'xxxxx', // 阿里云AccessKeyID
        'accessKeySecret' => 'xxxx', // 阿里云 AccessKeySecret
        'bucket' => 'xxx', // bucket
        'endpoint' => 'http://oss-cn-hangzhou.aliyuncs.com', //OSS节点地址
    ],
]

在 controller 中

 \Yii::$app->oss->upload($object,$file);

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • 1.009 January 2019

Comments



1.0 is the latest of one release



MIT license
Stats
2 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
16 total downloads