From 8a9c1b32dac14a8a39f4fb38db82d6487f84e294 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 30 Aug 2019 19:48:02 -0500 Subject: re-fetch media when local file is missing --- app/models/media_attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 3efab0aa1..932632b20 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -158,7 +158,7 @@ class MediaAttachment < ApplicationRecord end def needs_redownload? - file.blank? && remote_url.present? + (file.blank? || (Paperclip::Attachment.default_options[:storage] == :filesystem && !File.exist?(file.path))) && remote_url.present? end def video_or_audio? -- cgit