From 26585aa782226fecb230001d38220433619f39f7 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 14 Jun 2018 03:51:07 +0100 Subject: [PATCH] lib/php/mime.php --- lib/php/mime.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/php/mime.php b/lib/php/mime.php index 359b1b48..c038161d 100644 --- a/lib/php/mime.php +++ b/lib/php/mime.php @@ -770,7 +770,14 @@ class Mime { break; } - if (empty($id)) return; + if (empty($id)) { + $ext = preg_match(',^(\w+://|/).*\.(\w+)$,',$str,$m) ? $m[2] : ''; + if ($ext) foreach (self::Types as $t => $e) { + if (strpos($t,'video/') !== 0 or $e != $ext) continue; + return '