demarches-normaliennes/app/uploaders/base_uploader.rb

14 lines
347 B
Ruby
Raw Normal View History

class BaseUploader < CarrierWave::Uploader::Base
def cache_dir
Rails.application.secrets.carrierwave[:cache_dir]
end
# https://github.com/carrierwaveuploader/carrierwave/wiki/how-to:-silently-ignore-missing-files-on-destroy-or-overwrite
def remove!
begin
super
rescue Fog::Storage::OpenStack::NotFound
end
end
2017-04-04 15:27:04 +02:00
end