I'm using the KnpGaufretteBundle to store pictures on Amazon S3, I can easily create a file with the following code :
public function s3CreatFileAction(Request $request) {
$filesystem = $this->get('knp_gaufrette.filesystem_map')->get('profile_photos');
$filesystem->write('test.txt', 'hello world');
[...]
}
The problem is that I can't access to the file ...
$filesystem = $this->get('knp_gaufrette.filesystem_map')->get('profile_photos');
$file = $filesystem->get('test.txt');
I got the following message :
The file "test.txt" was not found.
I assume that is because the "test.txt" file is created with a "private" acl (when I make it public trought the S3 console I can access to it).
So my question is how to define a public acl when I create my object ?