instance method encode_filename

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v4.1.16 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16

Signature

encode_filename(filename)

No documentation comment.

Parameters

filename req
Source
# File actionpack/lib/action_dispatch/http/upload.rb, line 24
      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 24 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::Http::UploadedFile

Type at least 2 characters to search.

↑↓ navigate · open · esc close