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
|
|
|
|
rescue Fog::Storage::OpenStack::NotFound
|
|
|
|
end
|
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|