check if the upload method compatible with kleeja

This commit is contained in:
Mitan Omar
2020-06-30 11:18:35 -08:00
parent 295ffdc150
commit ba65cfc2e9

View File

@@ -54,6 +54,11 @@ $action = $config['siteurl'];
$uploadingMethodClassBaseName = basename($uploadingMethodClass, '.php');
$uploader = new $uploadingMethodClassBaseName;
if (! $uploader instanceof KleejaUploader) {
kleeja_err('Your upload Method class is not implemented our KleejaUploader Interface');
exit;
}
$uploader->setAllowedFileExtensions($d_groups[$userinfo['group_id']]['exts']);
$uploader->setUploadFieldsLimit($config['filesnum']);