Reload remote file the cacheds file is already removed
This commit is contained in:
parent
50b68fc2ea
commit
39d804b151
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,9 @@ module CarrierWave
|
|||
begin
|
||||
file_body = ::File.open(file_body.path) if file_body.closed? # Reopen if it's closed
|
||||
file_body.read
|
||||
rescue Errno::ENOENT
|
||||
@file = nil # rubocop:disable Gitlab/ModuleWithInstanceVariables
|
||||
file.body
|
||||
ensure
|
||||
file_body.close
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue