2017 © Pedro Peláez
 

yii2-extension yii2-aliyunoss

Yii2 component for aliyun oss

image

panwenbin/yii2-aliyunoss

Yii2 component for aliyun oss

  • Tuesday, June 12, 2018
  • by panwenbin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

阿里云OSS在指定Bucket操作Objects的封装

大部分情况我们程序只是使用OSS的存储功能,对于bucket管理用的比较少
所以对常用的部分做了封装,减少了bucket参数传递,处理了异常(异常时返回null), (*1)

在Yii2中使用

在配置文件增加, (*2)

return [
    'components' => [
        'oss' => [
            'class' => 'panwenbin\yii2\aliyunoss\OssBucket',
            'endPoint' => 'oss-cn-shanghai.aliyuncs.com',
            'accessKeyId' => 'abcdefghijklmn',
            'accessKeySecret' => '1234567890',
            'bucket' => 'panwenbin',
            'cname' => 'oss.panwenbin.com',
        ],
    ],
];

使用, (*3)

$oss = Yii::$app->get('oss');
$isSuccess = $oss->putObject('somefile.txt', 'This is a test file!');

The Versions

12/06 2018

dev-master

9999999-dev

Yii2 component for aliyun oss

  Sources   Download

MIT

The Requires

 

by Pan Wenbin

12/06 2018

0.1.1

0.1.1.0

Yii2 component for aliyun oss

  Sources   Download

MIT

The Requires

 

by Pan Wenbin

12/06 2018

0.1.0

0.1.0.0

Yii2 component for aliyun oss

  Sources   Download

MIT

The Requires

 

by Pan Wenbin