instance method
encode_filename
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v4.1.16 PrivateSignature
encode_filename(filename)
No documentation comment.
Parameters
-
filenamereq
Source
# File actionpack/lib/action_dispatch/http/upload.rb, line 35
def encode_filename(filename)
# Encode the filename in the utf8 encoding, unless it is nil or we're in 1.8
if "ruby".encoding_aware? && filename
filename.force_encoding("UTF-8").encode!
else
filename
end
end
Defined in actionpack/lib/action_dispatch/http/upload.rb line 35
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::UploadedFile