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

extensionaliyunossoss

Yii2 阿里云 OSS

安装

composer require mrk/yii2-aliyun-oss:@dev

or add

"mrk/yii2-aliyun-oss":"@dev"

使用

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

components => [
    'oss' => [
        'class' => 'mrk\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

No stable releases.

Comments



No stable releases.



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