Methods
L
N
P
R
Attributes
[RW] content_type

The content type of the “uploaded” file

[R] original_filename

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

Class Public methods
new(path, content_type = "text/plain", binary = false)
# File lib/rack/multipart/uploaded_file.rb, line 10
def initialize(path, content_type = "text/plain", binary = false)
  raise "#{path} file does not exist" unless ::File.exist?(path)
  @content_type = content_type
  @original_filename = ::File.basename(path)
  @tempfile = Tempfile.new([@original_filename, ::File.extname(path)], encoding: Encoding::BINARY)
  @tempfile.binmode if binary
  FileUtils.copy_file(path, @tempfile.path)
end
Instance Public methods
local_path()
Alias for: path
path()
Also aliased as: local_path
# File lib/rack/multipart/uploaded_file.rb, line 19
def path
  @tempfile.path
end
respond_to?(*args)
# File lib/rack/multipart/uploaded_file.rb, line 24
def respond_to?(*args)
  super or @tempfile.respond_to?(*args)
end