Class: OpenRosa::Fields::Upload

Inherits:
Base
  • Object
show all
Defined in:
lib/open_rosa/fields/upload.rb

Overview

Upload field for file/media uploads Maps to XForms element Data type: binary

Instance Attribute Summary collapse

Attributes inherited from Base

#default, #hint, #label, #name, #required

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Upload

Returns a new instance of Upload.



11
12
13
14
15
# File 'lib/open_rosa/fields/upload.rb', line 11

def initialize(name, options = {})
  super
  @mediatype = options[:mediatype]
  @max_pixels = options[:max_pixels]
end

Instance Attribute Details

#max_pixelsObject (readonly)

Returns the value of attribute max_pixels.



9
10
11
# File 'lib/open_rosa/fields/upload.rb', line 9

def max_pixels
  @max_pixels
end

#mediatypeObject (readonly)

Returns the value of attribute mediatype.



9
10
11
# File 'lib/open_rosa/fields/upload.rb', line 9

def mediatype
  @mediatype
end