powerkernel / yii-aws-s3
Yii2 AWS S3
Installs: 677
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Type:yii2-extension
Requires
- aws/aws-sdk-php: ~3.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-12-16 22:58:48 UTC
README
Yii AWS S3
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