fix mimetype detection

This commit is contained in:
Georg Ehrke 2012-03-19 12:41:10 +01:00
parent b13ab2b17e
commit fa104fee17

View file

@ -284,9 +284,7 @@ class OC_Helper {
$isWrapped=(strpos($path,'://')!==false) and (substr($path,0,7)=='file://');
$mimeType='application/octet-stream';
if ($mimeType=='application/octet-stream') {
if(count(self::$mimetypes)>0){
self::$mimetypes = include('mimetypes.fixlist.php');
}
self::$mimetypes = include('mimetypes.fixlist.php');
$extention=strtolower(strrchr(basename($path), "."));
$extention=substr($extention,1);//remove leading .
$mimeType=(isset(self::$mimetypes[$extention]))?self::$mimetypes[$extention]:'application/octet-stream';