Colon_Cancer_Predict1/app/models/colon_head_images_uploader1.rb

29 lines
634 B
Ruby
Raw Permalink Normal View History

2022-05-23 10:32:51 +00:00
# encoding: utf-8
class ColonHeadImagesUploader1 < CarrierWave::Uploader::Base
# Include RMagick or ImageScience support:
# include CarrierWave::RMagick
# include CarrierWave::ImageScience
# Choose what kind of storage to use for this uploader:
# storage :file
# storage :s3
# 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
return "uploads/#{model.class.to_s.underscore}/predict_tool"
end
# override
def filename
@original_filename
end
def cache_dir
"#{Rails.root}/tmp/uploads"
end
end