demarches-normaliennes/app/uploaders/base_uploader.rb

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