Sha256: f026ebf447068f1b3154a572353899524b9e4679b82ccb21d0a1d1db1c664f0d

Contents?: true

Size: 524 Bytes

Versions: 8

Compression:

Stored size: 524 Bytes

Contents

require 'carrierwave/processing/mini_magick'

class Models::FileUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick
  
  storage rad.config.fs_type

  # def sanitize_regexp
  #   /[^[:word:]\.\-\+\s_]/i
  # end

  def file_path
    "#{rad.config.fs_prefix}/system/#{model.class.model_name.underscore}/#{model.id}"
  end

  def store_dir
    "#{root}#{file_path}"
  end

  def extension_white_list
    [/.*/]
  end

  def cache_dir; rad.config.fs_cache_path end  
  def root; rad.config.fs_path end  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rad_kit-0.0.8 lib/kit/models/file_uploader.rb
rad_kit-0.0.7 lib/kit/models/file_uploader.rb
rad_kit-0.0.6 lib/kit/models/file_uploader.rb
rad_kit-0.0.5 lib/kit/models/file_uploader.rb
rad_kit-0.0.4 lib/kit/models/file_uploader.rb
rad_kit-0.0.3 lib/kit/models/file_uploader.rb
rad_kit-0.0.2 lib/kit/models/file_uploader.rb
rad_kit-0.0.1 lib/kit/models/file_uploader.rb