From 81681f04cad137f19e77dacecc619bccde38b8fb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 22 Jun 2019 02:50:36 +0200 Subject: Fix audio not being downloaded from remote servers (#11145) --- app/models/media_attachment.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/models') diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index e2a44d457..74f6c8899 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -216,6 +216,14 @@ class MediaAttachment < ApplicationRecord before_save :set_meta class << self + def supported_mime_types + IMAGE_MIME_TYPES + VIDEO_MIME_TYPES + AUDIO_MIME_TYPES + end + + def supported_file_extensions + IMAGE_FILE_EXTENSIONS + VIDEO_FILE_EXTENSIONS + AUDIO_FILE_EXTENSIONS + end + private def file_styles(f) -- cgit