0
0
Fork 0

Catch 404 errors when downloading remote media, add screenshot to landing page

This commit is contained in:
Eugen Rochko 2016-11-01 16:58:13 +01:00
parent bab4904492
commit 57304ac375
5 changed files with 37 additions and 1 deletions

View file

@ -20,6 +20,8 @@ class MediaAttachment < ApplicationRecord
def file_remote_url=(url)
self.file = URI.parse(url)
rescue OpenURI::HTTPError
#
end
def image?