Catch 404 errors when downloading remote media, add screenshot to landing page
This commit is contained in:
parent
bab4904492
commit
57304ac375
5 changed files with 37 additions and 1 deletions
|
@ -20,6 +20,8 @@ class MediaAttachment < ApplicationRecord
|
|||
|
||||
def file_remote_url=(url)
|
||||
self.file = URI.parse(url)
|
||||
rescue OpenURI::HTTPError
|
||||
#
|
||||
end
|
||||
|
||||
def image?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue