mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
get mimetype without encoding which simplifies the code
This commit is contained in:
parent
581841bc42
commit
08d10d2cc0
|
@ -658,11 +658,9 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
$finfo = new finfo(FILEINFO_MIME);
|
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||||
$mimetype = $finfo->file($tmpFile);
|
$mimetype = $finfo->file($tmpFile);
|
||||||
|
|
||||||
$tmp = explode(';', $mimetype);
|
|
||||||
$mimetype = $tmp[0];
|
|
||||||
$lastDotIndex = strrpos($name, ".");
|
$lastDotIndex = strrpos($name, ".");
|
||||||
if($lastDotIndex === false) $fileType = ".";
|
if($lastDotIndex === false) $fileType = ".";
|
||||||
else $fileType = substr($name, $lastDotIndex);
|
else $fileType = substr($name, $lastDotIndex);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user