mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +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);
|
||||
|
||||
$finfo = new finfo(FILEINFO_MIME);
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
$mimetype = $finfo->file($tmpFile);
|
||||
|
||||
$tmp = explode(';', $mimetype);
|
||||
$mimetype = $tmp[0];
|
||||
$lastDotIndex = strrpos($name, ".");
|
||||
if($lastDotIndex === false) $fileType = ".";
|
||||
else $fileType = substr($name, $lastDotIndex);
|
||||
|
|
Loading…
Reference in New Issue
Block a user