Sha256: 838fc230fa332f898f7968fdf2fa60ed88440fd3e3d964834c9a56c00221293d

Contents?: true

Size: 1.03 KB

Versions: 68

Compression:

Stored size: 1.03 KB

Contents

class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
  include Ckeditor::Backend::CarrierWave

  # Include RMagick or ImageScience support:
  # include CarrierWave::RMagick
  # include CarrierWave::MiniMagick
  # include CarrierWave::ImageScience

  # Choose what kind of storage to use for this uploader:
  storage :file

  # Override the directory where uploaded files will be stored.
  # This is a sensible default for uploaders that are meant to be mounted:
  def store_dir
    "uploads/ckeditor/attachments/#{model.id}"
  end

  # Provide a default URL as a default if there hasn't been a file uploaded:
  # def default_url
  #   "/images/fallback/" + [version_name, "default.png"].compact.join('_')
  # end

  # Process files as they are uploaded:
  # process :scale => [200, 300]
  #
  # def scale(width, height)
  #   # do something
  # end

  # Add a white list of extensions which are allowed to be uploaded.
  # For images you might use something like this:
  def extension_white_list
    Ckeditor.attachment_file_types
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
udongo-7.2.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.1.3 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.1.2 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.1.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.1.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.0.4 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.0.3 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.0.2 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.0.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-7.0.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.6.3 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.6.2 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.6.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.6.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.5.2 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.5.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.5.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.4.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.4.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.3.2 app/uploaders/ckeditor_attachment_file_uploader.rb