Sha256: 01dd72178631d62e6936dffb18b88c9eee0e4cafbaf020e401183a78b2a11ed7

Contents?: true

Size: 632 Bytes

Versions: 31

Compression:

Stored size: 632 Bytes

Contents

# This class represents a file upload field found in a form.  To use this
# class, set FileUpload#file_data= to the data of the file you want to upload
# and FileUpload#mime_type= to the appropriate mime type of the file.
#
# See the example in EXAMPLES

class Mechanize::Form::FileUpload < Mechanize::Form::Field
  attr_accessor :file_name # File name
  attr_accessor :mime_type # Mime Type (Optional)

  alias :file_data :value
  alias :file_data= :value=

  def initialize node, file_name
    @file_name = Mechanize::Util.html_unescape(file_name)
    @file_data = nil
    @node      = node
    super(node, @file_data)
  end
end

Version data entries

31 entries across 31 versions & 5 rubygems

Version Path
mechanize-2.7.7 lib/mechanize/form/file_upload.rb
husc-0.2.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/form/file_upload.rb
husc-0.2.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/form/file_upload.rb
husc-0.1.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/form/file_upload.rb
husc-0.1.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/form/file_upload.rb
mechanize-2.7.6 lib/mechanize/form/file_upload.rb
mechanize-2.7.5 lib/mechanize/form/file_upload.rb
mechanize-2.7.4 lib/mechanize/form/file_upload.rb
mechanize-2.7.3 lib/mechanize/form/file_upload.rb
mechanize-2.7.2 lib/mechanize/form/file_upload.rb
mechanize-2.7.1 lib/mechanize/form/file_upload.rb
mechanize-2.7.0 lib/mechanize/form/file_upload.rb
mechanize-2.6.0 lib/mechanize/form/file_upload.rb
mechanize-2.5.1 lib/mechanize/form/file_upload.rb
mechanize-2.5 lib/mechanize/form/file_upload.rb
mechanize-2.4 lib/mechanize/form/file_upload.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/form/file_upload.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/form/file_upload.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/form/file_upload.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/form/file_upload.rb