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

Image files that have a name containing "+" are not treated #3

Closed
asitemade4u opened this issue Dec 10, 2021 · 5 comments
Closed

Image files that have a name containing "+" are not treated #3

asitemade4u opened this issue Dec 10, 2021 · 5 comments

Comments

@asitemade4u
Copy link

With the same setting as #2 , I have tried to treat images from the map folder.
They are named according to another scheme, for example: map/air-lanes-jfk-lga-2018-5b+6DVXbdWRw86PJv+0.png

When I try to treat the above image I get an error:

  • the URL: http://mdi.lan.ourquietplaces.com:7123/unsafe/fit-in/-500x500/10x10/filters:hue(290):saturation(100):fill(yellow):format(jpeg):quality(80)/map/air-lanes-jfk-lga-2018-5b+6DVXbdWRw86PJv+0.png
  • the error I get: {"Op":"Get","URL":"https://'map/air-lanes-jfk-lga-2018-5b%206DVXbdWRw86PJv%200.png%27","Err":{"Op":"dial","Net":"tcp","Source":null,"Addr":null,"Err":{"Err":"no such host","Name":"'map","Server":"","IsTimeout":false,"IsTemporary":false,"IsNotFound":true}}}
@asitemade4u asitemade4u changed the title Image files name containing "+" are not treated Image files that have a name containing "+" are not treated Dec 10, 2021
@cshum
Copy link
Owner

cshum commented Dec 10, 2021

For the url with symbols, please do a encodeURIComponent('map/air-lanes-jfk-lga-2018-5b+6DVXbdWRw86PJv+0.png') (in JavaScript) in order to get the escaped path, as + will be interpreted as space character.

For instance the encoded path will become
http://mdi.lan.ourquietplaces.com:7123/unsafe/fit-in/-500x500/10x10/filters:hue(290):saturation(100):fill(yellow):format(jpeg):quality(80)/map%2Fair-lanes-jfk-lga-2018-5b%2B6DVXbdWRw86PJv%2B0.png

Though that strange error message is something need to be fixed separately.

@asitemade4u
Copy link
Author

And yet + is an accepted character in URLs, if i read this well

@cshum
Copy link
Owner

cshum commented Dec 10, 2021

Yes it is allowed, but + is interpreted as space character.
Same goes for Google search https://www.google.com/search?q=a+b

@asitemade4u
Copy link
Author

OK, get it but not a big deal, was just pinpointing it.

@cshum
Copy link
Owner

cshum commented Dec 10, 2021

You may inspect the parameters being parsed by adding /params in front:

http://mdi.lan.ourquietplaces.com:7123/params/unsafe/fit-in/-500x500/10x10/filters:hue(290):saturation(100):fill(yellow):format(jpeg):quality(80)/map%2Fair-lanes-jfk-lga-2018-5b%2B6DVXbdWRw86PJv%2B0.png

http://mdi.lan.ourquietplaces.com:7123/params/unsafe/fit-in/-500x500/10x10/filters:hue(290):saturation(100):fill(yellow):format(jpeg):quality(80)/map/air-lanes-jfk-lga-2018-5b+6DVXbdWRw86PJv+0.png

and check the difference in the image field

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

2 participants