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

S3 GET Parameters not stripped #529

Closed
rdohms opened this issue Nov 19, 2014 · 5 comments
Closed

S3 GET Parameters not stripped #529

rdohms opened this issue Nov 19, 2014 · 5 comments

Comments

@rdohms
Copy link

rdohms commented Nov 19, 2014

We use S3 to store our images and use a temporary url to read them, this url obviously has a few extra parameters in it.

0ed3ab5ec2bd1fbaa44c4dbc4766205a.jpg?AWSAccessKeyId=<key>&Expires=1408614399&Signature=<signature>

This is fine when it goes into the cache manager for loading, but the cached file simply dumps that full url, into the filename, schema and get parameters included.

What's the best way around this? I would guess a transformation on the check of caching and the write of caching would be enough is this doable from outside the plugin?

@makasim
Copy link
Collaborator

makasim commented Jun 16, 2015

This is the url of cached image, is it? And do you want to strip those query parameters off? If so you can create a listener on POST_RESOLVE and do with the url whatever you need.

@svassaux
Copy link

@rdohms @makasim same issue with the new asset component of symfony, see #647
This would be nice to have s simple parameter option to remove get parameters. Meanwhile, creating a listener should do it, I'll give it a try

@svassaux
Copy link

@makasim I've tried with a listener which strips get parameters ath the post_resolve event but there are cases when this post_resolve event is not called.

the following does not go through the resolve function, how can I handle that ?
img class="img-circle" src="{{ asset('images/user.png') | imagine_filter('mini') }}"

@makasim
Copy link
Collaborator

makasim commented Oct 28, 2015

If the cache already exist, you are redirected to the cached image, by passing the filter action, indeed the post resolve event is not triggered.

We may need a new listener which triggers before we resolved the cached image url

@michellesanver
Copy link
Contributor

@rdohms @makasim Unclear if this is still an issue. Since this is so old, could you do me a favour and open a new issue if that is the case? Then we can prioritise and possibly implement a new feature accordingly. Thanks! :)

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

4 participants