Sha256: 6d1a4c65152cf26a1d8d6142d0b498f161c3721b311b0982e83208da331ab2bc
Contents?: true
Size: 517 Bytes
Versions: 11
Compression:
Stored size: 517 Bytes
Contents
module Celerity # # For fields that accept file uploads # class FileField < InputElement TAGS = [ Identifier.new('input', :type => %w[file]) ] DEFAULT_HOW = :name # # Set the file field to the given path # def set(path) assert_exists path = path.to_s @container.update_page @object.setValueAttribute(path) unless @object.getContentType @object.setContentType(Celerity::Util.content_type_for(path)) end end end # FileField end # Celerity
Version data entries
11 entries across 11 versions & 4 rubygems