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

help with amazons3 and gaufrette loader #776

Closed
marcesh opened this issue Aug 27, 2016 · 2 comments
Closed

help with amazons3 and gaufrette loader #776

marcesh opened this issue Aug 27, 2016 · 2 comments

Comments

@marcesh
Copy link

marcesh commented Aug 27, 2016

I'm having major trouble getting liipimaginebundle to run with amazon s3 resolver

this is my configuration

#Gaufrette Configuration
knp_gaufrette:
    adapters:
        amazon:
            aws_s3:
                service_id: 'aws_s3.client'
                bucket_name: "%amazon.bucket%"
                options:
                    acl: 'public-read'
                    create: true
    filesystems:
        filesystem_aws_s3_images:
            adapter: amazon            
    stream_wrapper: ~

#Imagine Configuration             
liip_imagine:
    loaders:
        loader_aws_s3_images:
            stream:
                wrapper: gaufrette://filesystem_aws_s3_images/
    resolvers:
       cache_resolver_aws_s3:
          aws_s3:
              client_config:
                  credentials:
                      key:    %amazon.key%
                      secret: %amazon.secret%
                  region: %amazon.region%
                  version: latest
              bucket: "%amazon.bucket%"
              get_options:
                  Scheme: 'https'
              put_options:
                  CacheControl: 'max-age=86400'
    filter-sets:
        thumbnail:
            data_loader: loader_aws_s3_images
            cache: cache_resolver_aws_s3
            quality: 75
            filters:
                thumbnail: { size: [300, 300], mode: inset }                 

I have an Image at https://s3.amazonaws.com/bucketname/3a4416a3a718ff6c9fbcd3e26e1fa5f6/c341267b8f74132264e90e9e9b1089aa.jpeg

the thumbnail filter resolves to
http://www.mydomain.com/media/cache/resolve/thumbnail/3a4416a3a718ff6c9fbcd3e26e1fa5f6/c341267b8f74132264e90e9e9b1089aa.jpeg

however this delivers an error

[1/2] NotLoadableException: Source image gaufrette://filesystem_aws_s3_images/3a4416a3a718ff6c9fbcd3e26e1fa5f6/c341267b8f74132264e90e9e9b1089aa.jpeg not found.

what could i have possibly done wrong?! i tried a dozen different configurations from all tutorials and threads i could find, but nothing works. any help would be greatly appreciated.

@alexwilson
Copy link
Collaborator

Hey,

At a glance, are you sure that the credentials you're using have the correct roles to view the file and/or its S3 bucket, and that you are specifying the correct region? The error is thrown before the CacheResolver can kick in, so the issue may be with the Gaufrette configuration.

@michellesanver
Copy link
Contributor

Since there was no response, I wonder if this is still an issue @marcesh? I am closing it for now.

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

No branches or pull requests

3 participants