jawadi121 / smart-lencioni-image-resizer

Automatically exported from code.google.com/p/smart-lencioni-image-resizer
GNU General Public License v3.0
0 stars 0 forks source link

Need to urlencode filename #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. A filename with a + character
2.
3.

What is the expected output? What do you see instead?
Resized version of the original image. Instead there is an error that image
can't be found

What version of the product are you using? On what operating system?
SVN from 10th Sept 2009. LAMP server

Please provide any additional information below.
I think the addition of urlencode() to the filename, not the entire path
would be useful since users can often upload images to blogs and online
image galleries that allow + and other characters that currently break the
script. 

Original issue reported on code.google.com by adrianbj...@gmail.com on 11 Sep 2009 at 7:06

GoogleCodeExporter commented 9 years ago
True, the + character in the image parameter must be converted to %2B in order 
to work with 
SLIR. This can be accomplished by the PHP functions rawurlencode() or 
urlencode().

However, I believe that this isn't a problem with the SLIR code itself, but 
rather an issue 
with the documentation or an implementation of the code. SLIR doesn't create 
the URLs to 
the images, the developer implementing SLIR on her website does. People who 
implement SLIR 
need to be aware of this.

Perhaps there should be a helper class or a method in the SLIR class that 
accepts the 
parameters and returns what the link should be.

Original comment by joe.lencioni on 25 Jan 2010 at 7:30

GoogleCodeExporter commented 9 years ago
Hi Joe,

Thanks for your feedback. I have been happy running urlencode on my image paths 
-
perhaps, as you said, making users aware of this in the documentation would 
suffice.

Thanks,
Adrian

Original comment by adrianbj...@gmail.com on 25 Jan 2010 at 7:36

GoogleCodeExporter commented 9 years ago
I added a paragraph to the documentation about URL encoding filenames.

Original comment by joe.lencioni on 25 Jan 2010 at 7:54