aws/aws-sdk-php-symfony

How to get S3Client in Controller symfony

zSakuraEvilz opened this issue · 2 comments

After install aws/aws-sdk-php and aws/aws-sdk-php-symfony. How to get S3Client in Controller symfony. Pls help me. Thank

This bundle exposes an instance of Aws\S3\S3Client as a service named aws.s3. Inside of a standard Symfony controller (i.e., one that extends Symfony\Bundle\FrameworkBundle\Controller\Controller), you can get the the S3 client by calling $this->get('aws.s3'). If you're defining your controllers as services, you can also inject the aws.s3 service.

Hope that helps!

Thank you