file uploads
-
I don’t concider this is as actual bug, but I beleive it is better to give user better understanding what’s going on while one tries to upload file into blog filesystem.
At some points upload will failed and user should have better explanation why that’s happened.
I proposing following quick changes to wp-admin/upload.php:first of all add in the beginning of the script array:
$errors = array(‘1’ => ‘The size of the uploded file(s) exceeded the value of the upload_max_file setting in php.ini. Please, consult sysadmin.’,
‘2’ => ‘The size of the uploded file(s) exceeded the value of the special form field MAX_FILE_SIZE. Please, consult admin of this blog.’,
‘3’ => ‘The was a problem uploading the file because only a partial file was received.’,
‘4’ => ‘There was no file uploaded at all because the user did not select any in the upload form.’);secondly add foloing line just above lines 129 and 174:
print “$errors[$err]<br/>”;
and change line 182 to:
or die(sprintf(__(“$errors[$err]<br/>Couldn’t upload your file to %s.”), $pathtofile));
- The topic ‘file uploads’ is closed to new replies.