Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

kostiklv
Copy link
Contributor

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)

@@ -314,6 +326,9 @@ public function testProcessCorrectlyOptionsOnAddConfiguration()
$this->assertArrayHasKey('url_options', $config);
$this->assertEquals($expectedUrlOptions, $config['url_options']);

$this->assertArrayHasKey('url_options', $config);
Copy link

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 ?

Copy link
Contributor Author

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')
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

@makasim
Copy link
Collaborator

makasim commented Dec 10, 2014

merged as part of #535

@makasim makasim closed this Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants