diff options
author | phecho <phecho@163.com> | 2016-12-13 18:21:02 +0800 |
---|---|---|
committer | phecho <phecho@163.com> | 2016-12-13 18:21:02 +0800 |
commit | 2ed00b69a032018d15e1986e4cfe5c89f63206c9 (patch) | |
tree | 5f02e3ed4988262aeb03634e120886dba9846e29 /app/functions.php | |
parent | f83178bef8084bfe57963b1820e73b4a9ab0bab5 (diff) |
Verify file upload size
Diffstat (limited to 'app/functions.php')
-rw-r--r-- | app/functions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/functions.php b/app/functions.php index e732f308..9dd054fb 100644 --- a/app/functions.php +++ b/app/functions.php @@ -136,6 +136,16 @@ function build_app_version($ref, $commit_hash) } /** + * 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 * * @return string |