powerkernel/yii-aws-s3

Yii2 AWS S3

Installs: 646

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 1

Type:yii2-extension

1.0.2 2018-12-25 12:41 UTC

This package is auto-updated.

Last update: 2024-04-16 21:36:03 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