소스 검색

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.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4040 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 년 전
부모
커밋
332cc02513
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      application/utils.inc.php

+ 1 - 1
application/utils.inc.php

@@ -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))