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-6.3.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.3.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.2.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.2.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.1.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-6.0.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.9.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.8.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.7.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.6.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.5.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.4.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.3.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.3.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.2.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.1.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.0.2 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.0.1 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-5.0.0 app/uploaders/ckeditor_attachment_file_uploader.rb
udongo-4.0.0 app/uploaders/ckeditor_attachment_file_uploader.rb