Added files repo error information for post_max_size and upload_max_filesize

This commit is contained in:
Calvo 2022-03-28 11:18:08 +02:00
parent 52df92e715
commit b7923fe494
2 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,7 @@ function pandora_files_repo_godmode()
// Check for an anoying error that causes the $_POST and $_FILES arrays. // Check for an anoying error that causes the $_POST and $_FILES arrays.
// were empty if the file is larger than the post_max_size. // were empty if the file is larger than the post_max_size.
if (intval($server_content_length) > 0 && empty($_POST)) { if (intval($server_content_length) > 0 && empty($_POST)) {
ui_print_error_message(__('The file exceeds the maximum size')); ui_print_error_message(__('Problem uploading. Please check this PHP runtime variable values: <pre> post_max_size (currently '.ini_get('post_max_size').')</pre>'));
} }
// GET and POST parameters. // GET and POST parameters.

View File

@ -2887,6 +2887,7 @@ function translate_file_upload_status($status_code)
case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_INI_SIZE:
$message = __('The file exceeds the maximum size'); $message = __('The file exceeds the maximum size');
$message .= __('Please check this PHP runtime variable values: <pre> upload_max_filesize (currently '.ini_get('upload_max_filesize').')</pre>');
break; break;
case UPLOAD_ERR_FORM_SIZE: case UPLOAD_ERR_FORM_SIZE: