diff options
Diffstat (limited to 'files')
-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(); |