mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 18:30:20 +02:00
Files Manager Improvements - Maximum upload file size message - added #94
This commit is contained in:
@@ -236,6 +236,7 @@ class FilesmanagerAdmin extends Backend
|
||||
->assign('forbidden_types', $forbidden_types)
|
||||
->assign('image_types', $image_types)
|
||||
->assign('site_url', $site_url)
|
||||
->assign('upload_max_filesize', FilesmanagerAdmin::uploadSize())
|
||||
->assign('files_path', $files_path)
|
||||
->assign('fileuploader', array(
|
||||
'uploadUrl' => $site_url.'/admin/index.php?id=filesmanager&path='.$path,
|
||||
@@ -273,4 +274,13 @@ class FilesmanagerAdmin extends Backend
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Upload Size
|
||||
*/
|
||||
public static function uploadSize()
|
||||
{
|
||||
return Number::byteFormat(min(Number::convertToBytes(ini_get('upload_max_filesize')),
|
||||
Number::convertToBytes(ini_get('post_max_size'))));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user