mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: properly handle external image download errors
This commit is contained in:
parent
bdfdbcd217
commit
a52d31e25e
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue