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
|
# create the thumbnail otherwise
|
||||||
original_path = Discourse.store.path_for(upload)
|
original_path = Discourse.store.path_for(upload)
|
||||||
if original_path.blank?
|
if original_path.blank?
|
||||||
external_copy = Discourse.store.download(upload)
|
external_copy = Discourse.store.download(upload) rescue nil
|
||||||
original_path = external_copy.try(:path)
|
original_path = external_copy.try(:path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue