Sha256: 56ff218d276075c0a1c8f6aed5bef85afa8eb8e74bd23cf38648534af4eb33cc
Contents?: true
Size: 700 Bytes
Versions: 35
Compression:
Stored size: 700 Bytes
Contents
module Uploadbox class ImageProcessingUploader < CarrierWave::Uploader::Base include CarrierWave::MimeTypes include CarrierWave::MiniMagick include CarrierWave::Processing::MiniMagick process :set_content_type process :strip def store_dir # "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" "uploads/image/#{mounted_as}/#{model.id}" end def extension_white_list %w(jpg jpeg gif png) end def filename if original_filename extension = File.extname(original_filename) name = File.basename(original_filename, extension).parameterize.dasherize "#{name}#{extension}" end end end end
Version data entries
35 entries across 35 versions & 1 rubygems