[Fix #2697] When file does not exist on openstack do not crash
This commit is contained in:
parent
77275bb52b
commit
917b271a7f
1 changed files with 8 additions and 0 deletions
|
@ -2,4 +2,12 @@ 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
|
||||
|
|
Loading…
Reference in a new issue