mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
check against maxuploadsize when uploading a new document
This commit is contained in:
parent
f72e70d9a6
commit
d7dccfd299
|
@ -660,6 +660,13 @@ switch($command) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$maxuploadsize = SeedDMS_Core_File::parse_filesize($settings->_maxUploadSize);
|
||||
if ($maxuploadsize && $_FILES["userfile"]["size"] > $maxuploadsize) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>getMLText("uploading_maxsize")));
|
||||
exit;
|
||||
}
|
||||
|
||||
$userfiletmp = $_FILES["userfile"]["tmp_name"];
|
||||
$userfiletype = $_FILES["userfile"]["type"];
|
||||
$userfilename = $_FILES["userfile"]["name"];
|
||||
|
|
Loading…
Reference in New Issue
Block a user