From aa9b37822bd39dff771844b7b1ac149e37788d34 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/media_attachment.rb') diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 4c55d4b98..a9b6d96c6 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -177,6 +177,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