mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
override mimetype only if mimetype != 'applicatin/octet-stream'
This commit is contained in:
parent
780aca0b76
commit
8c19c652b5
|
@ -353,7 +353,9 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
|
||||
if($settings->_overrideMimeType) {
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$userfiletype = finfo_file($finfo, $userfiletmp);
|
||||
$tmpfiletype = finfo_file($finfo, $userfiletmp);
|
||||
if($tmpfiletype != 'application/octet-stream')
|
||||
$userfiletype = $tmpfiletype;
|
||||
}
|
||||
|
||||
if ((count($_FILES["userfile"]["tmp_name"])==1)&&($_POST["name"]!=""))
|
||||
|
|
|
@ -102,7 +102,9 @@ if (isset($_FILES['userfile']) && $_FILES['userfile']['error'] == 0) {
|
|||
|
||||
if($settings->_overrideMimeType) {
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$userfiletype = finfo_file($finfo, $userfiletmp);
|
||||
$tmpfiletype = finfo_file($finfo, $userfiletmp);
|
||||
if($tmpfiletype != 'application/octet-stream')
|
||||
$userfiletype = $tmpfiletype;
|
||||
}
|
||||
} elseif($settings->_dropFolderDir) {
|
||||
if($_POST['dropfolderfileform1']) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user