X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fmime.ex;h=36771533f01336c8331ebd7d989273437212228d;hb=527093e35760633c0abb23d67d1c379d5536d342;hp=e3a389749de8e8ab318cee74edbce6920d4c193c;hpb=922abcda61298a7bca48894cb9a51a52fdeab1ed;p=akkoma
diff --git a/lib/pleroma/mime.ex b/lib/pleroma/mime.ex
index e3a389749..36771533f 100644
--- a/lib/pleroma/mime.ex
+++ b/lib/pleroma/mime.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.MIME do
@@ -102,10 +102,18 @@ defmodule Pleroma.MIME do
"audio/ogg"
end
- defp check_mime_type(<<0x52, 0x49, 0x46, 0x46, _::binary>>) do
+ defp check_mime_type(<<"RIFF", _::binary-size(4), "WAVE", _::binary>>) do
"audio/wav"
end
+ defp check_mime_type(<<"RIFF", _::binary-size(4), "WEBP", _::binary>>) do
+ "image/webp"
+ end
+
+ defp check_mime_type(<<"RIFF", _::binary-size(4), "AVI.", _::binary>>) do
+ "video/avi"
+ end
+
defp check_mime_type(_) do
@default
end