Class WWW::Mechanize::FileUpload
In: lib/mechanize/form_elements.rb
Parent: Field
Mechanize\n[lib/mechanize.rb\nlib/mechanize/cookie.rb\nlib/mechanize/errors.rb\nlib/mechanize/form.rb\nlib/mechanize/form_elements.rb\nlib/mechanize/history.rb\nlib/mechanize/list.rb\nlib/mechanize/page.rb\nlib/mechanize/page_elements.rb\nlib/mechanize/pluggable_parsers.rb] lib/mechanize.rb WWW dot/m_19_0.png

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

Methods

new  

External Aliases

value -> file_data
value= -> file_data=

Attributes

file_name  [RW] 
mime_type  [RW] 

Public Class methods

[Source]

    # File lib/mechanize/form_elements.rb, line 38
38:     def initialize(name, file_name)
39:       @file_name = Util.html_unescape(file_name)
40:       @file_data = nil
41:       super(name, @file_data)
42:     end

[Validate]