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

S3Resolver how to pass https: true in objUrlOptions #196

Closed
jaskra opened this issue Jun 18, 2013 · 2 comments
Closed

S3Resolver how to pass https: true in objUrlOptions #196

jaskra opened this issue Jun 18, 2013 · 2 comments
Labels
Type: Documentation This item pertains to documentation of this project.

Comments

@jaskra
Copy link

jaskra commented Jun 18, 2013

I see the objUrlOptions was introduced to add support for https on S3Resolver
but I am not sure how to add this to my config
is there a way to add this in my service definition?

I currently have something like this:

app.imagine.cache.resolver.amazon_s3:
class: Liip\ImagineBundle\Imagine\Cache\Resolver\AmazonS3Resolver
arguments:
- "@appl.S3"
- "%aws_bucket%"
tags:
- { name: 'liip_imagine.cache.resolver', resolver: 'amazon_s3' }

I suspect I can add it as an argument but am not sure how to format it
suggestions?

@havvg
Copy link
Contributor

havvg commented Jun 18, 2013

Both versions work, it's just like tags :)

app.imagine.cache.resolver.amazon_s3:
        class: Liip\ImagineBundle\Imagine\Cache\Resolver\AmazonS3Resolver
        arguments:
            - "@appl.S3"
            - "%aws_bucket%"
            - 'public-read'
            -
                https: true
        tags:
            - { name: 'liip_imagine.cache.resolver', resolver: 'amazon_s3' }

If you prefer inline associative arrays:

app.imagine.cache.resolver.amazon_s3:
        class: Liip\ImagineBundle\Imagine\Cache\Resolver\AmazonS3Resolver
        arguments:
            - "@appl.S3"
            - "%aws_bucket%"
            - 'public-read'
            - { https: true }
        tags:
            - { name: 'liip_imagine.cache.resolver', resolver: 'amazon_s3' }

@havvg
Copy link
Contributor

havvg commented Jun 18, 2013

You could also do this:

app.imagine.cache.resolver.amazon_s3:
        class: Liip\ImagineBundle\Imagine\Cache\Resolver\AmazonS3Resolver
        arguments:
            - "@appl.S3"
            - "%aws_bucket%"
        calls:
             - [ setObjectUrlOption, [ 'https', true ] ]
        tags:
            - { name: 'liip_imagine.cache.resolver', resolver: 'amazon_s3' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation This item pertains to documentation of this project.
Projects
None yet
Development

No branches or pull requests

2 participants