Internal: when uploading documents, get the mimetype from the file itself (if feasible) rather than relying on the mimetype of the HTTP header. This was already implemented but it was buggy and fell anytime into the fallback method.

SVN:trunk[4040]
This commit is contained in:
Romain Quetiez
2016-05-10 10:57:25 +00:00
parent ae22bbbc81
commit 45ddc7f71b

View File

@@ -287,7 +287,7 @@ class utils
$rInfo = @finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
if ($rInfo !== false)
{
$sType = @finfo_file($rInfo, $file);
$sType = @finfo_file($rInfo, $sTmpName);
if ( ($sType !== false)
&& is_string($sType)
&& (strlen($sType)>0))