-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring putObject options when saving to S3 #518
Conversation
@@ -314,6 +326,9 @@ public function testProcessCorrectlyOptionsOnAddConfiguration() | |||
$this->assertArrayHasKey('url_options', $config); | |||
$this->assertEquals($expectedUrlOptions, $config['url_options']); | |||
|
|||
$this->assertArrayHasKey('url_options', $config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you should check for object_options key here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed.
@@ -93,6 +94,10 @@ public function addConfiguration(ArrayNodeDefinition $builder) | |||
->useAttributeAsKey('key') | |||
->prototype('scalar')->end() | |||
->end() | |||
->arrayNode('object_options') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about put_options
name. It would be better to rename url_options
to get_options
but we can due BC promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll rename it to put_options
. I kinda disliked object_options
initially.
We can probably rename url_options
to get_options
as well, update the docs and just provide B/C so that url_options
are just converted to get_options
. It should be a separate PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just provide B/C so that url_options are just converted to get_options
good idea.
merged as part of #535 |
I needed this to be able to control
CacheControl
headers returned from S3 (it makes a lot of sense when you serve images from S3), but it can be used for setting other options as well (e.g.ContentDisposition
)