atellitech / flysystem-s3-yii2
It's an adapter of AWS S3 for Yii2 that integrating with atellitech/flysystem-yii2.
1.0.0
2023-02-05 10:28 UTC
Requires
- php: >=8.0
- async-aws/simple-s3: ^1.1
- atellitech/flysystem-yii2: ^1.0.0
- league/flysystem-async-aws-s3: ^3.0
- league/flysystem-aws-s3-v3: ^3.0
- yiisoft/yii2: ^2.0
Requires (Dev)
- phpstan/phpstan: ^1.9
README
It's an adapter of AWS S3 for Yii2 that integrating with atellitech/flysystem-yii2
Supports
- AWS S3
Please see https://flysystem.thephpleague.com/docs/adapter/aws-s3-v3/ - Async AWS S3
Please see https://flysystem.thephpleague.com/docs/adapter/async-aws-s3/
Getting Start
Requirements
- php8.0+
Install
$ /lib/path/composer require atellitech/flysystem-s3-yii2
Usage
AWS S3
Add component into config file of yii2 project
...
"components": [
"fs" => [
'class' => 'AtelliTech\\Yii2\\FlysystemAdapterAwsS3',
'bucketName' => '{bucketName}',
'pathPrefix' => '{pathPrefix}', default: '' means root path of bucket
'version' => '{version}', // default: latest
'key' => '{key}',
'secret' => '{secret}',
'region' => '{region}', // default: ap-northeast-1
]
]
Async AWS S3
Add component into config file of yii2 project
...
"components": [
"fs" => [
'class' => 'AtelliTech\\Yii2\\FlysystemAdapterAwsAsyncS3',
'bucketName' => '{bucketName}',
'pathPrefix' => '{pathPrefix}', default: '' means root path of bucket
'version' => '{version}', // default: latest
'key' => '{key}',
'secret' => '{secret}',
'region' => '{region}', // default: ap-northeast-1
]
]