Merge pull request #2936 from betagouv/fix-2697
[Fix #2697] When file does not exist on openstack do not crash (Fog::Storage::OpenStack::NotFound)
This commit is contained in:
commit
66fb0c70f6
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…
Add table
Reference in a new issue