diff --git a/lib/private/files/type/detection.php b/lib/private/files/type/detection.php index e84c63875c..d7cc9ebbf4 100644 --- a/lib/private/files/type/detection.php +++ b/lib/private/files/type/detection.php @@ -74,6 +74,7 @@ class Detection { $info = @strtolower(finfo_file($finfo, $path)); if ($info) { $mimeType = substr($info, 0, strpos($info, ';')); + return empty($mimeType) ? 'application/octet-stream' : $mimeType; } finfo_close($finfo); }