Catch 404 errors when downloading remote media, add screenshot to landing page
This commit is contained in:
@ -20,6 +20,8 @@ class MediaAttachment < ApplicationRecord
|
||||
|
||||
def file_remote_url=(url)
|
||||
self.file = URI.parse(url)
|
||||
rescue OpenURI::HTTPError
|
||||
#
|
||||
end
|
||||
|
||||
def image?
|
||||
|
Reference in New Issue
Block a user