mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[GH-ISSUE #264] question about query parameters #121
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rafipiccolo on GitHub (Dec 11, 2020).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/264
Hello all, I have a pure question, not a bug.
Is there any technical reason for not using query parameters to pass settings ? Is it only a cosmetic choice ?
i mean this :
https://www.myservice.io/upload/w_333,h_333,q_90/https://m0.cl/t/butterfly-3000.jpg
could have been :
https://www.myservice.io/generate?w=333&h=333&q=90&src=https://m0.cl/t/butterfly-3000.jpg
@sadok-f commented on GitHub (Dec 14, 2020):
Hi @rafipiccolo ,
Thank you for your question.
isn't only a cosmetic choice but also technical, the upload route composed of 2 parameters:
optionswhich is the list of options to pass to the image processor handler, in your example it isw_333,h_333,q_90imageSrcwhich is the URL to the source imagehttps://m0.cl/t/butterfly-3000.jpgPassing the whole options as one parameter (with customized delimiter) make it easier to manipulate those options and merge them with their default values as well.
If you have a special use case why do you need such a route, please provide us with more information.
Thank you again!
Best,
Sadok
@rafipiccolo commented on GitHub (Dec 14, 2020):
Okay i see it has some advantages : smaller url, ez parsing.
Thanks for the reply,