about summary refs log tree commit diff
path: root/app/models/media_attachment.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-01 16:58:13 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-01 16:58:13 +0100
commit57304ac375e905fb0efa1b98a6100828bdbef2e1 (patch)
tree820e85a777938b618cc18fe3d45c0fcc9aaf7179 /app/models/media_attachment.rb
parentbab4904492dff61f20f44e6e0daf040173990214 (diff)
Catch 404 errors when downloading remote media, add screenshot to landing page
Diffstat (limited to 'app/models/media_attachment.rb')
-rw-r--r--app/models/media_attachment.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 55eabc226..a740792f2 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -20,6 +20,8 @@ class MediaAttachment < ApplicationRecord
 
   def file_remote_url=(url)
     self.file = URI.parse(url)
+  rescue OpenURI::HTTPError
+    #
   end
 
   def image?