From 2ed00b69a032018d15e1986e4cfe5c89f63206c9 Mon Sep 17 00:00:00 2001 From: phecho Date: Tue, 13 Dec 2016 18:21:02 +0800 Subject: Verify file upload size --- app/functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/functions.php') diff --git a/app/functions.php b/app/functions.php index e732f308..9dd054fb 100644 --- a/app/functions.php +++ b/app/functions.php @@ -135,6 +135,16 @@ function build_app_version($ref, $commit_hash) return $version; } +/** + * Get upload max size. + * + * @return string + */ +function get_upload_max_size() +{ + return min(ini_get('upload_max_filesize'), ini_get('post_max_size')); +} + /** * Translate a string * -- cgit v1.2.3