mirror of
https://github.com/discourse/discourse.git
synced 2025-06-13 01:46:29 +08:00
don't silence these errors
This commit is contained in:
@ -195,11 +195,9 @@ class OptimizedImage < ActiveRecord::Base
|
|||||||
if external
|
if external
|
||||||
url = SiteSetting.scheme + ":" + previous_url
|
url = SiteSetting.scheme + ":" + previous_url
|
||||||
file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil
|
file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil
|
||||||
next unless file
|
|
||||||
path = file.path
|
path = file.path
|
||||||
else
|
else
|
||||||
path = local_store.path_for(optimized_image)
|
path = local_store.path_for(optimized_image)
|
||||||
next unless File.exists?(path)
|
|
||||||
file = File.open(path)
|
file = File.open(path)
|
||||||
end
|
end
|
||||||
# compute SHA if missing
|
# compute SHA if missing
|
||||||
|
@ -167,11 +167,9 @@ class Upload < ActiveRecord::Base
|
|||||||
if external
|
if external
|
||||||
url = SiteSetting.scheme + ":" + previous_url
|
url = SiteSetting.scheme + ":" + previous_url
|
||||||
file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil
|
file = FileHelper.download(url, max_file_size_kb, "discourse", true) rescue nil
|
||||||
next unless file
|
|
||||||
path = file.path
|
path = file.path
|
||||||
else
|
else
|
||||||
path = local_store.path_for(upload)
|
path = local_store.path_for(upload)
|
||||||
next unless File.exists?(path)
|
|
||||||
end
|
end
|
||||||
# compute SHA if missing
|
# compute SHA if missing
|
||||||
if upload.sha1.blank?
|
if upload.sha1.blank?
|
||||||
|
Reference in New Issue
Block a user