mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix mimetype detection
This commit is contained in:
parent
b13ab2b17e
commit
fa104fee17
1 changed files with 1 additions and 3 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue