demarches-normaliennes/app/uploaders/base_uploader.rb
2018-11-28 16:15:33 +01:00

13 lines
347 B
Ruby

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::OpenStack::Storage::NotFound
end
end
end