diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-26 03:24:00 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-26 03:24:00 +0100 |
commit | ff9111847f6646a35a7197c0c956559972a7bccb (patch) | |
tree | 42950951f998904b183657e76ecf669420154b08 | |
parent | a5e892505e494b906f942aa3ac1d6489f73a5f05 (diff) | |
download | nextcloud-server-ff9111847f6646a35a7197c0c956559972a7bccb.tar.gz nextcloud-server-ff9111847f6646a35a7197c0c956559972a7bccb.zip |
additional error codes for file upload
-rw-r--r-- | files/ajax/upload.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php index 241edc216ff..67611fb893e 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -16,12 +16,13 @@ foreach ($_FILES['files']['error'] as $error) { if ($error != 0) { $l=new OC_L10N('files'); $errors = array( - 0=>$l->t("There is no error, the file uploaded with success"), - 1=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'), - 2=>$l->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"), - 3=>$l->t("The uploaded file was only partially uploaded"), - 4=>$l->t("No file was uploaded"), - 6=>$l->t("Missing a temporary folder") + UPLOAD_ERR_OK=>$l->t("There is no error, the file uploaded with success"), + UPLOAD_ERR_INI_SIZE=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'), + UPLOAD_ERR_FORM_SIZE=>$l->t("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form"), + UPLOAD_ERR_PARTIAL=>$l->t("The uploaded file was only partially uploaded"), + UPLOAD_ERR_NO_FILE=>$l->t("No file was uploaded"), + UPLOAD_ERR_NO_TMP_DIR=>$l->t("Missing a temporary folder"), + UPLOAD_ERR_CANT_WRITE=>$l->t('Failed to write to disk'), ); OC_JSON::error(array("data" => array( "message" => $errors[$error] ))); exit(); |