Verify file upload size

This commit is contained in:
phecho
2016-12-13 18:21:02 +08:00
parent f83178bef8
commit 2ed00b69a0
5 changed files with 14 additions and 4 deletions

View File

@@ -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
*