From: Nicolas Boisselier Date: Thu, 14 Jun 2018 02:51:07 +0000 (+0100) Subject: lib/php/mime.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=26585aa782226fecb230001d38220433619f39f7;p=nb.git lib/php/mime.php --- 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 '