mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:45:56 +00:00
import_export: better error message if upload failed
This commit is contained in:
@@ -2449,4 +2449,20 @@
|
||||
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
function get_upload_error_message($code) {
|
||||
|
||||
$errors = array(
|
||||
0 => __('There is no error, the file uploaded with success'),
|
||||
1 => __('The uploaded file exceeds the upload_max_filesize directive in php.ini'),
|
||||
2 => __('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'),
|
||||
3 => __('The uploaded file was only partially uploaded'),
|
||||
4 => __('No file was uploaded'),
|
||||
6 => __('Missing a temporary folder'),
|
||||
7 => __('Failed to write file to disk.'),
|
||||
8 => __('A PHP extension stopped the file upload.'),
|
||||
);
|
||||
|
||||
return $errors[$code];
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user