mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 05:52:46 +08:00
FIX: properly handle external image download errors
This commit is contained in:
parent
bdfdbcd217
commit
a52d31e25e
|
@ -26,7 +26,7 @@ class OptimizedImage < ActiveRecord::Base
|
|||
# create the thumbnail otherwise
|
||||
original_path = Discourse.store.path_for(upload)
|
||||
if original_path.blank?
|
||||
external_copy = Discourse.store.download(upload)
|
||||
external_copy = Discourse.store.download(upload) rescue nil
|
||||
original_path = external_copy.try(:path)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user