Parent

Class Index [+]

Quicksearch

Rack::Multipart::UploadedFile

Attributes

original_filename[R]

The filename, not including the path, of the “uploaded” file

content_type[RW]

The content type of the “uploaded” file

Public Class Methods

new(path, content_type = "text/plain", binary = false) click to toggle source
    # File lib/rack/multipart/uploaded_file.rb, line 10
10:       def initialize(path, content_type = "text/plain", binary = false)
11:         raise "#{path} file does not exist" unless ::File.exist?(path)
12:         @content_type = content_type
13:         @original_filename = ::File.basename(path)
14:         @tempfile = Tempfile.new(@original_filename)
15:         @tempfile.set_encoding(Encoding::BINARY) if @tempfile.respond_to?(:set_encoding)
16:         @tempfile.binmode if binary
17:         FileUtils.copy_file(path, @tempfile.path)
18:       end

Public Instance Methods

local_path() click to toggle source
Alias for: path
path() click to toggle source
    # File lib/rack/multipart/uploaded_file.rb, line 20
20:       def path
21:         @tempfile.path
22:       end
Also aliased as: local_path
respond_to?(*args) click to toggle source
    # File lib/rack/multipart/uploaded_file.rb, line 25
25:       def respond_to?(*args)
26:         super or @tempfile.respond_to?(*args)
27:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.