Sha256: 1da26cecde1e3b5a25ad536cb5b6a7af54e3031bab507491b4931cbab79bbd53
Contents?: true
Size: 524 Bytes
Versions: 15
Compression:
Stored size: 524 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
15 entries across 15 versions & 2 rubygems