Sha256: c5deab9a044e2f1e7965c7e6c12eb447788c5a57e9197612e8b3d86e35015877

Contents?: true

Size: 778 Bytes

Versions: 15

Compression:

Stored size: 778 Bytes

Contents

module WWW
  class Mechanize
    class Form
      # 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[link://files/EXAMPLES_txt.html]
      class FileUpload < Field
        attr_accessor :file_name # File name
        attr_accessor :mime_type # Mime Type (Optional)
        
        alias :file_data :value
        alias :file_data= :value=
      
        def initialize(name, file_name)
          @file_name = Util.html_unescape(file_name)
          @file_data = nil
          super(name, @file_data)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 5 rubygems

Version Path
eric-mechanize-0.9.3.20090623142847 lib/www/mechanize/form/file_upload.rb
knu-mechanize-0.9.3.20090623142847 lib/www/mechanize/form/file_upload.rb
tenderlove-mechanize-0.9.3.20090617085936 lib/www/mechanize/form/file_upload.rb
tenderlove-mechanize-0.9.3.20090623142847 lib/www/mechanize/form/file_upload.rb
mechanize-ntlm-0.9.1 lib/www/mechanize/form/file_upload.rb
mechanize-0.8.0 lib/www/mechanize/form/file_upload.rb
mechanize-0.8.4 lib/www/mechanize/form/file_upload.rb
mechanize-0.8.3 lib/www/mechanize/form/file_upload.rb
mechanize-0.8.2 lib/www/mechanize/form/file_upload.rb
mechanize-0.8.1 lib/www/mechanize/form/file_upload.rb
mechanize-0.9.2 lib/www/mechanize/form/file_upload.rb
mechanize-0.9.0 lib/www/mechanize/form/file_upload.rb
mechanize-0.9.3 lib/www/mechanize/form/file_upload.rb
mechanize-0.9.1 lib/www/mechanize/form/file_upload.rb
mechanize-0.8.5 lib/www/mechanize/form/file_upload.rb