From 662f87dbe9c23e505fc9ffa3f21d6a623f4df974 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 29 Aug 2024 04:52:29 -0400 Subject: [PATCH] Use `MediaAttachment.supported_mime_types` method where relevant (#31635) --- app/serializers/rest/instance_serializer.rb | 2 +- app/serializers/rest/v1/instance_serializer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index 084701657e..cced83587d 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -77,7 +77,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer }, media_attachments: { - supported_mime_types: MediaAttachment::IMAGE_MIME_TYPES + MediaAttachment::VIDEO_MIME_TYPES + MediaAttachment::AUDIO_MIME_TYPES, + supported_mime_types: MediaAttachment.supported_mime_types, image_size_limit: MediaAttachment::IMAGE_LIMIT, image_matrix_limit: Attachmentable::MAX_MATRIX_LIMIT, video_size_limit: MediaAttachment::VIDEO_LIMIT, diff --git a/app/serializers/rest/v1/instance_serializer.rb b/app/serializers/rest/v1/instance_serializer.rb index 636925b973..7f9f21c5af 100644 --- a/app/serializers/rest/v1/instance_serializer.rb +++ b/app/serializers/rest/v1/instance_serializer.rb @@ -69,7 +69,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer }, media_attachments: { - supported_mime_types: MediaAttachment::IMAGE_MIME_TYPES + MediaAttachment::VIDEO_MIME_TYPES + MediaAttachment::AUDIO_MIME_TYPES, + supported_mime_types: MediaAttachment.supported_mime_types, image_size_limit: MediaAttachment::IMAGE_LIMIT, image_matrix_limit: Attachmentable::MAX_MATRIX_LIMIT, video_size_limit: MediaAttachment::VIDEO_LIMIT,