Attachments on S3 do not escape '%' in URLs #563

indirect opened this Issue Aug 23, 2011 · 0 comments


None yet

2 participants


When using S3 to save an image named "Screen%20shot%202011-07-06%20at%2012.56.16.png", Paperclip generates a URL that is not escaped correctly. The generated URL returns a 401 error from S3, since it does not exist.

> playlist_item.thumb.url
=> ""

However, if you manually escape the percent signs in the file name, you end up with a URL that actually works and retrieves the file that Paperclip saved earlier:

> playlist_item.thumb.url.gsub('%', '%25')
=> ""

That URL actually works, but I'd really rather not have to add a gsub everywhere that I call the Paperclip #url method. :)

@sikachu sikachu added a commit that closed this issue Sep 23, 2011
@sikachu sikachu Return a URI.escape'd URL from attachment
It's Paperclip's responsibility to escape special characters from the URL to make sure that it's comply with standard.

Closes #577, Closes #563, and reverse my judgement on #482.
@sikachu sikachu closed this in 23cb822 Sep 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment