summaryrefslogtreecommitdiff
path: root/program/steps/mail/upload.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/upload.inc')
-rw-r--r--program/steps/mail/upload.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/program/steps/mail/upload.inc b/program/steps/mail/upload.inc
index 0d9761e44..06ed26591 100644
--- a/program/steps/mail/upload.inc
+++ b/program/steps/mail/upload.inc
@@ -65,6 +65,16 @@ foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath)
$id,
$content);
}
+ else // upload failed
+ {
+ $err = $_FILES['_attachments']['error'][$i];
+ if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE)
+ $msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
+ else
+ $msg = rcube_label('fileuploaderror');
+
+ $response = sprintf("parent.%s.display_message('%s', 'error');", $JS_OBJECT_NAME, JQ($msg));
+ }
}