[GH-ISSUE #191] Image path parameters is ignored #690

Closed
opened 2026-03-15 15:04:32 +03:00 by kerem · 6 comments
Owner

Originally created by @yoldar on GitHub (Sep 13, 2018).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/191

Originally assigned to: @sadok-f on GitHub.

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.

Originally created by @yoldar on GitHub (Sep 13, 2018). Original GitHub issue: https://github.com/flyimg/flyimg/issues/191 Originally assigned to: @sadok-f on GitHub. 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.
Author
Owner

@sadok-f commented on GitHub (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

<!-- gh-comment-id:421067175 --> @sadok-f commented on GitHub (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`
Author
Owner

@yoldar commented on GitHub (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!

<!-- gh-comment-id:421250848 --> @yoldar commented on GitHub (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!
Author
Owner

@yoldar commented on GitHub (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.

<!-- gh-comment-id:421264028 --> @yoldar commented on GitHub (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.
Author
Owner

@sadok-f commented on GitHub (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!

<!-- gh-comment-id:421472382 --> @sadok-f commented on GitHub (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!
Author
Owner

@yoldar commented on GitHub (Sep 16, 2018):

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

<!-- gh-comment-id:421749264 --> @yoldar commented on GitHub (Sep 16, 2018): Thanks! It would be great! P.s. Open source rulez! 😁
Author
Owner

@sadok-f commented on GitHub (Sep 16, 2018):

Here we go

<!-- gh-comment-id:421751775 --> @sadok-f commented on GitHub (Sep 16, 2018): Here we go
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#690
No description provided.