Parent

Class Index [+]

Quicksearch

Rack::Utils::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/utils.rb, line 451
451:         def initialize(path, content_type = "text/plain", binary = false)
452:           raise "#{path} file does not exist" unless ::File.exist?(path)
453:           @content_type = content_type
454:           @original_filename = ::File.basename(path)
455:           @tempfile = Tempfile.new(@original_filename)
456:           @tempfile.set_encoding(Encoding::BINARY) if @tempfile.respond_to?(:set_encoding)
457:           @tempfile.binmode if binary
458:           FileUtils.copy_file(path, @tempfile.path)
459:         end

Public Instance Methods

local_path() click to toggle source
Alias for: path
path() click to toggle source
     # File lib/rack/utils.rb, line 461
461:         def path
462:           @tempfile.path
463:         end
Also aliased as: local_path

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.