2017 © Pedro Peláez
 

yii2-extension yii2-aliyun-oss

Yii2 阿里云 OSS

image

mrk/yii2-aliyun-oss

Yii2 阿里云 OSS

  • Friday, June 22, 2018
  • by Alexcck
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 150 % Grown

The README.md

Yii2 阿里云 OSS

安装, (*1)

composer require saviorlv/yii2-aliyun-oss -vvv

or add, (*2)

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

使用, (*3)

在 main.php 文件中做如下修改, (*4)

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

在 controller 中, (*5)

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

The Versions

22/06 2018

dev-master

9999999-dev

Yii2 阿里云 OSS

  Sources   Download

MIT

The Requires

 

extension yii2 oss aliyunoss