Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Saving images from url with special characters #1921 #1932

Closed
wants to merge 4 commits into from

Conversation

Piioo
Copy link
Contributor

@Piioo Piioo commented Jul 11, 2015

#1921 Now it is possible to save images from url with special characters like http://www.foo/öäü.jpg

end

it "returns a file name" do
assert_equal "paperclip-%C3%B6%C3%A4%C3%BC%E5%AD%97%C2%B4%C2%BD%E2%99%A5%C3%98%C2%B2%C3%88.png", @subject.original_filename

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [129/80]

@jyurek
Copy link

jyurek commented Jul 14, 2015

One quick comment, and if you can handle the Hound complaints, I'll totally pull this in. Thanks!

url = "https://github.com/thoughtbot/paperclip-öäü字´½♥زÈ.png"
subject = Paperclip.io_adapters.for(url)
filename = 'paperclip-%C3%B6%C3%A4%C3%BC%E5%AD%97%C2%B4%C2%BD%E2%99%A5'\
'%C3%98%C2%B2%C3%88.png'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@Piioo
Copy link
Contributor Author

Piioo commented Jul 26, 2015

@jyurek I don't get this errors on my local machine.

@lenart
Copy link

lenart commented Oct 15, 2015

Why is this not merged? Having the same problems with UTF-8 characters in the URI (e.g. http://www.foo/öäü.jpg)

@tute
Copy link
Contributor

tute commented May 9, 2016

Thanks for your work! @Piioo, can you please squash your commits together and rebase on top of latest master? If CI is green, we'll merge. Thanks! ❤️

@tute
Copy link
Contributor

tute commented May 9, 2016

I've got a passing CI build, will rebase myself: https://travis-ci.org/thoughtbot/paperclip/builds/128930480. Thank you!

@tute tute closed this in dfd73b3 May 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants