2016-11-02 10:18:59 +01:00
|
|
|
class BaseUploader < CarrierWave::Uploader::Base
|
|
|
|
def cache_dir
|
2018-09-04 14:43:03 +02:00
|
|
|
Rails.application.secrets.carrierwave[:cache_dir]
|
2016-11-02 10:18:59 +01:00
|
|
|
end
|
2018-10-31 15:20:45 +01:00
|
|
|
|
|
|
|
# https://github.com/carrierwaveuploader/carrierwave/wiki/how-to:-silently-ignore-missing-files-on-destroy-or-overwrite
|
|
|
|
def remove!
|
|
|
|
begin
|
|
|
|
super
|
2018-11-28 16:15:33 +01:00
|
|
|
rescue Fog::OpenStack::Storage::NotFound
|
2018-10-31 15:20:45 +01:00
|
|
|
end
|
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|