Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function s3CreatFileAction(Request $request) {
- $filesystem = $this->get('knp_gaufrette.filesystem_map')->get('profile_photos');
- $filesystem->write('test.txt', 'hello world');
- [...]
- }
- $filesystem = $this->get('knp_gaufrette.filesystem_map')->get('profile_photos');
- $file = $filesystem->get('test.txt');
- #app/config/config.yml
- services:
- acme.aws_s3.client:
- class: AwsS3S3Client
- factory_class: AwsS3S3Client
- factory_method: 'factory'
- arguments:
- -
- key: %amazon_s3.key%
- secret: %amazon_s3.secret%
- # knp_gaufrette
- knp_gaufrette:
- adapters:
- profile_photos:
- aws_s3:
- service_id: 'acme.aws_s3.client'
- bucket_name: 'myBucket'
- options:
- directory: 'myDirectory'
- acl: 'public-read'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement