PHPackages                             mztest/yii2-widget-upload-oss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. mztest/yii2-widget-upload-oss

ActiveLibrary[File &amp; Storage](/categories/file-storage)

mztest/yii2-widget-upload-oss
=============================

A widget for uploading files to AliYun OSS

1.0.0(9y ago)0270MITPHP

Since Dec 5Pushed 9y agoCompare

[ Source](https://github.com/mztest/yii2-widget-upload-oss)[ Packagist](https://packagist.org/packages/mztest/yii2-widget-upload-oss)[ Docs](https://github.com/mztest/yii2-widget-upload-oss)[ RSS](/packages/mztest-yii2-widget-upload-oss/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

yii2-widget-upload-oss
======================

[](#yii2-widget-upload-oss)

A widget for uploading files to AliYun OSS

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require mztest/yii2-widget-upload-oss

```

or add

```
"mztest/yii2-widget-upload-oss": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

1. Set signature action at your controller

    ```
    public function actions()
    {
        return [
            'upload' => [
                'oss-signature' => [
                    'class' => 'mztest\uploadOSS\actions\Signature',
                    'accessKeyId' => 'Your aliyunOSS access key id here.',
                    'accessKeySecret' => 'Your aliyunOSS access secret id here.',
                    'host' => 'Your aliyunOSS upload bucket url',
                ],
            ],
        ];
    }
    ```
2. Simply use it in your code by :

    ```

    ```

    or

    ```
