1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

Issue #550 - filetypes.xml now used by media-manager.

This commit is contained in:
Cameron
2021-04-21 11:51:53 -07:00
parent 4034d4ab0c
commit 098660d38a
4 changed files with 57 additions and 4 deletions

View File

@@ -2232,6 +2232,7 @@ class e_media
rename("{$filePath}.part", $filePath);
}
return $this->processAjaxImport($filePath, $_REQUEST);
}
@@ -2254,6 +2255,13 @@ class e_media
$targetDir = e_IMPORT;
$fileName = basename($filePath);
if(e107::getFile()->isAllowedType($filePath) !== true)
{
$this->ajaxUploadLog($filePath, $fileName, filesize($filePath), false, "Unapproved file-type. (".__METHOD__.")");
@unlink($filePath);
return '{"jsonrpc" : "2.0", "error" : {"code": 120, "message": "Unapproved file-type detected. '.$filePath.'"}, "id" : "id"}';
}
if(e107::getFile()->isClean($filePath) !== true)
{