diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-22 16:54:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-22 16:54:06 +0200 |
commit | b927bb3f07b88d0a7bc39a7661d26dd1c9fc05d4 (patch) | |
tree | f5ae10f6c2cb65d6a560b0f849d4d1d8614c3a15 /app/models/media_attachment.rb | |
parent | 6eb5241099357fd75a19c2d51245c197b517d363 (diff) |
Fix audio-only OGG and WebM files not being processed as such (#11151)
Also, because Chrome sends audio/mp3 instead of audio/mpeg as it's supposed to, we need to whitelist that mime type as well
Diffstat (limited to 'app/models/media_attachment.rb')
-rw-r--r-- | app/models/media_attachment.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index a9b6d96c6..30d9a9851 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -31,9 +31,9 @@ class MediaAttachment < ApplicationRecord AUDIO_FILE_EXTENSIONS = ['.ogg', '.oga', '.mp3', '.wav', '.flac', '.opus'].freeze IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze - VIDEO_MIME_TYPES = ['video/webm', 'video/mp4', 'video/quicktime'].freeze + VIDEO_MIME_TYPES = ['video/webm', 'video/mp4', 'video/quicktime', 'video/ogg'].freeze VIDEO_CONVERTIBLE_MIME_TYPES = ['video/webm', 'video/quicktime'].freeze - AUDIO_MIME_TYPES = ['audio/wave', 'audio/wav', 'audio/x-wav', 'audio/x-pn-wave', 'audio/ogg', 'audio/mpeg', 'audio/webm', 'audio/flac'].freeze + AUDIO_MIME_TYPES = ['audio/wave', 'audio/wav', 'audio/x-wav', 'audio/x-pn-wave', 'audio/ogg', 'audio/mpeg', 'audio/mp3', 'audio/webm', 'audio/flac'].freeze BLURHASH_OPTIONS = { x_comp: 4, |