summaryrefslogtreecommitdiff
path: root/app/functions.php
diff options
context:
space:
mode:
authorphecho <phecho@163.com>2016-12-13 18:21:02 +0800
committerphecho <phecho@163.com>2016-12-13 18:21:02 +0800
commit2ed00b69a032018d15e1986e4cfe5c89f63206c9 (patch)
tree5f02e3ed4988262aeb03634e120886dba9846e29 /app/functions.php
parentf83178bef8084bfe57963b1820e73b4a9ab0bab5 (diff)
Verify file upload size
Diffstat (limited to 'app/functions.php')
-rw-r--r--app/functions.php10
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