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

Image path parameters is ignored #191

Closed
yoldar opened this Issue Sep 13, 2018 · 6 comments

Comments

@yoldar

yoldar commented Sep 13, 2018

Hi guys!

Is that possible to not ignore image path parameters?

When I try this in container:
curl "http://localhost/upload/w_500,h_500,q_90/http://some.com/uploads/image.jpg?token=342342342334&someParam=dlklksfdldf

I got error:

Error occurred while trying to read the file Url : http://some.com/uploads/image.jpg

Download image in container with regular wget works normal.

wget http://some.com/uploads/image.jpg?token=342342342334&someParam=dlklksfdldf is ok

P.s. I really need this because downloading images can only be with access params like token and so on.

@sadok-f

This comment has been minimized.

Show comment
Hide comment
@sadok-f

sadok-f Sep 13, 2018

Member

Hi @yoldar !

The problem is with ? which will convert the token into a parameter GET in the flyimg application, maybe if you try to encode it before pass it to flyimg server:

curl "http://localhost/upload/w_500,h_500,q_90/http://some.com/uploads/image.jpg%3Ftoken=342342342334

Member

sadok-f commented Sep 13, 2018

Hi @yoldar !

The problem is with ? which will convert the token into a parameter GET in the flyimg application, maybe if you try to encode it before pass it to flyimg server:

curl "http://localhost/upload/w_500,h_500,q_90/http://some.com/uploads/image.jpg%3Ftoken=342342342334

@yoldar

This comment has been minimized.

Show comment
Hide comment
@yoldar

yoldar Sep 14, 2018

Hi @yoldar !

The problem is with ? which will convert the token into a parameter GET in the flyimg application, maybe if you try to encode it before pass it to flyimg server:

curl "http://localhost/upload/w_500,h_500,q_90/http://some.com/uploads/image.jpg%3Ftoken=342342342334

Thanks!

yoldar commented Sep 14, 2018

Hi @yoldar !

The problem is with ? which will convert the token into a parameter GET in the flyimg application, maybe if you try to encode it before pass it to flyimg server:

curl "http://localhost/upload/w_500,h_500,q_90/http://some.com/uploads/image.jpg%3Ftoken=342342342334

Thanks!

@yoldar

This comment has been minimized.

Show comment
Hide comment
@yoldar

yoldar Sep 14, 2018

@sadok-f

Could you please advice is that possible to ignore all parameters when making hash naming for original and optimized files? I mean original-HASH than stored under "tmp" folder and HASH.webp under "uploads" folder?

P.s. Because access token changes every time but image still the same.

yoldar commented Sep 14, 2018

@sadok-f

Could you please advice is that possible to ignore all parameters when making hash naming for original and optimized files? I mean original-HASH than stored under "tmp" folder and HASH.webp under "uploads" folder?

P.s. Because access token changes every time but image still the same.

@sadok-f

This comment has been minimized.

Show comment
Hide comment
@sadok-f

sadok-f Sep 14, 2018

Member

@yoldar Thanks for pointing this out, in fact, the original image should be saved without considering any extras arguments, so the hash should be generated only with the image source URL.
I'll work on it this weekend and hopefully submit a PR regarding that!

Thank you again!

Member

sadok-f commented Sep 14, 2018

@yoldar Thanks for pointing this out, in fact, the original image should be saved without considering any extras arguments, so the hash should be generated only with the image source URL.
I'll work on it this weekend and hopefully submit a PR regarding that!

Thank you again!

@sadok-f sadok-f self-assigned this Sep 14, 2018

@sadok-f sadok-f added this to the Version 1.2 milestone Sep 14, 2018

@yoldar

This comment has been minimized.

Show comment
Hide comment
@yoldar

yoldar Sep 16, 2018

Thanks! It would be great!
P.s. Open source rulez! 😁

yoldar commented Sep 16, 2018

Thanks! It would be great!
P.s. Open source rulez! 😁

@sadok-f

This comment has been minimized.

Show comment
Hide comment
@sadok-f

sadok-f Sep 16, 2018

Member

Here we go

Member

sadok-f commented Sep 16, 2018

Here we go

@sadok-f sadok-f closed this in a6af630 Sep 16, 2018

sadok-f added a commit that referenced this issue Sep 16, 2018

Merge pull request #193 from flyimg/issue-#191
issue-#191: mage path parameters is ignored, closes #191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment