powerkernel/yii-aws-s3

Yii2 AWS S3

Installs: 84

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.2 2018-12-25 12:41 UTC

README

Yii AWS S3

Latest Stable Version Total Downloads GitHub license

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist powerkernel/yii-aws-s3 "*"

or add

"powerkernel/yii-aws-s3": "*"

to the require section of your composer.json file.

Usage

To use this extension, simply add the following code in your application configuration:

'components' => [
// ...
's3' => [
            '__class' => powerkernel\s3\AwsS3::class,
            'key' => 'your aws sns key',
            'secret' => 'your aws sns secret',
            'region' => 'us-west-2',
            // 'endpoint' => '', // for digital ocean spaces https://sfo2.digitaloceanspaces.com
        ],
// ...        
], 

You can then call AWS S3 functions as follows:

Yii::$app->s3->client->put($arg);
// ...

For further instructions refer to the AWS Documentation page