Sha256: 64439b6d65723084b420ae0399a0c38e27fc64a7e7a1b1a2f9422fa1fea69b0a
Contents?: true
Size: 990 Bytes
Versions: 27
Compression:
Stored size: 990 Bytes
Contents
module Alchemy::Custom::Model::ElFinder module Volumes class AlchemyFiles < AlchemyFile def initialize(options = {root: '/files', name: 'Alchemy Library - Files', id: 'alchemy_library_files', url: '/'}) super end def files(target = '.') super(root_path) end def decode(hash) super do |path| Paths::File.new(@root, path, volume: self) end end def upload(target, upload) super do |file| f = ::Alchemy::Attachment.create( file: file ) root_path.build_file_path(f) end end def search(type:, q:) super do search_query_build(klass: ::Alchemy::Attachment, type: type, q: q, mime_attribute: :file_mime_type) end end def disabled_commands super + ['rm'] end private def root_path Paths::Files.new(@root, '.', volume: self) end end end end
Version data entries
27 entries across 27 versions & 1 rubygems