mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
19 lines
322 B
Ruby
19 lines
322 B
Ruby
# encoding: utf-8
|
|
|
|
class ImageUploader < CarrierWave::Uploader::Base
|
|
include CarrierWave::RMagick
|
|
|
|
storage :file
|
|
|
|
def store_dir
|
|
File.join("local", "maps")
|
|
end
|
|
|
|
def filename
|
|
model.id.to_s + File.extname(@filename) unless @filename.nil?
|
|
end
|
|
|
|
def extension_white_list
|
|
%w(jpg jpeg gif png)
|
|
end
|
|
end
|