Parent

Class Index [+]

Quicksearch

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

(Not documented)

     # File lib/rack/utils.rb, line 423
423:         def initialize(path, content_type = "text/plain", binary = false)
424:           raise "#{path} file does not exist" unless ::File.exist?(path)
425:           @content_type = content_type
426:           @original_filename = ::File.basename(path)
427:           @tempfile = Tempfile.new(@original_filename)
428:           @tempfile.set_encoding(Encoding::BINARY) if @tempfile.respond_to?(:set_encoding)
429:           @tempfile.binmode if binary
430:           FileUtils.copy_file(path, @tempfile.path)
431:         end

Public Instance Methods

local_path() click to toggle source

Alias for path

path() click to toggle source

(Not documented)

     # File lib/rack/utils.rb, line 433
433:         def path
434:           @tempfile.path
435:         end
Also aliased as: local_path

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.