Sha256: 82114970a17e09cdd5ce83d7898027643e7b4c577e6ad21d0e38ef11cb7c3f6f

Contents?: true

Size: 321 Bytes

Versions: 15

Compression:

Stored size: 321 Bytes

Contents

# encoding: utf-8

module Locomotive
  class EditableFileUploader < BaseUploader

    def store_dir
      self.build_store_dir('sites', model.page.site_id, 'pages', model.page.id, 'files')
    end

    def image?
      if self.file.exists?
        self.file.content_type.start_with?('image')
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.2.0.alpha1 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.1.1 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.1.0 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.1.0.rc1 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.3 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.2 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.1 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.0 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.0.rc0 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.0.alpha3 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-3.4.1 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.0.alpha2 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-4.0.0.alpha1 app/uploaders/locomotive/editable_file_uploader.rb
locomotivecms-3.4.0 app/uploaders/locomotive/editable_file_uploader.rb