about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-30 19:48:02 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-30 19:48:02 -0500
commit8a9c1b32dac14a8a39f4fb38db82d6487f84e294 (patch)
tree44d3f539ae55b97bdaa3beb4ea7159ca3914ec6c /app
parenta97ce6534d66c3500f5546f9bdbd5c7d2ed1f966 (diff)
re-fetch media when local file is missing
Diffstat (limited to 'app')
-rw-r--r--app/models/media_attachment.rb2
1 files changed, 1 insertions, 1 deletions
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?