Skip to content

Commit

Permalink
This is to add an opportunity for injecting S3 options like ACL permi…
Browse files Browse the repository at this point in the history
…ssions. One needs them in case it's expected for newly upload files be "public-read". (#365)

It's also fixes the wrong default value for "use_path_style_endpoint" flag.
  • Loading branch information
therosco authored and helios-ag committed Jul 28, 2019
1 parent bc724ef commit f49ec06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Configuration/ElFinderConfigurationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private function configureFlysystem($opt, $adapter, $serviceName)
'endpoint' => $opt['aws_s3_v3']['endpoint'],
'use_path_style_endpoint' => $opt['aws_s3_v3']['use_path_style_endpoint'],
));
$filesystem = new Filesystem(new AwsS3v3($client, $opt['aws_s3_v3']['bucket_name'], $opt['aws_s3_v3']['optional_prefix']));
$filesystem = new Filesystem(new AwsS3v3($client, $opt['aws_s3_v3']['bucket_name'], $opt['aws_s3_v3']['optional_prefix'], $opt['aws_s3_v3']['options']));

break;
case 'copy_com':
Expand Down
8 changes: 7 additions & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,13 @@ private function createFlysystemNode()
->scalarNode('bucket_name')->defaultvalue('')->end()
->scalarNode('optional_prefix')->defaultvalue('')->end()
->scalarNode('endpoint')->defaultvalue('')->end()
->scalarNode('use_path_style_endpoint')->defaultValue('')->end()
->scalarNode('use_path_style_endpoint')->defaultValue(false)->end()
->arrayNode('options')
->canBeEnabled()
->children()
->scalarNode('ACL')->defaultvalue('')->end()
->end()
->end()
->end()
->end()
->arrayNode('copy_com')
Expand Down

0 comments on commit f49ec06

Please sign in to comment.