summaryrefslogtreecommitdiff
path: root/program/steps/mail/attachments.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-10-03 19:12:27 +0000
committeralecpl <alec@alec.pl>2009-10-03 19:12:27 +0000
commitebf8726eeaa507096ef28e776303b459c401a924 (patch)
tree2e10ae8f41fe12f97a34b034ecb89e46b1eb0b92 /program/steps/mail/attachments.inc
parent2c7296a82df28cbd1d44949d948bdea35f4cb836 (diff)
- Added attachment upload indicator with parallel upload (#1486058)
Diffstat (limited to 'program/steps/mail/attachments.inc')
-rw-r--r--program/steps/mail/attachments.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/steps/mail/attachments.inc b/program/steps/mail/attachments.inc
index b57037d05..28d6108d4 100644
--- a/program/steps/mail/attachments.inc
+++ b/program/steps/mail/attachments.inc
@@ -74,6 +74,8 @@ if (!is_array($_SESSION['compose']['attachments'])) {
// clear all stored output properties (like scripts and env vars)
$OUTPUT->reset();
+$uploadid = get_input_value('_uploadid', RCUBE_INPUT_GET);
+
if (is_array($_FILES['_attachments']['tmp_name'])) {
foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath) {
$attachment = array(
@@ -109,7 +111,7 @@ if (is_array($_FILES['_attachments']['tmp_name'])) {
$content .= Q($attachment['name']);
- $OUTPUT->command('add2attachment_list', "rcmfile$id", $content);
+ $OUTPUT->command('add2attachment_list', "rcmfile$id", $content, $uploadid);
}
else { // upload failed
$err = $_FILES['_attachments']['error'][$i];
@@ -124,6 +126,7 @@ if (is_array($_FILES['_attachments']['tmp_name'])) {
}
$OUTPUT->command('display_message', $msg, 'error');
+ $OUTPUT->command('remove_from_attachment_list', $uploadid);
}
}
}
@@ -135,10 +138,10 @@ else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
else
$msg = rcube_label('fileuploaderror');
$OUTPUT->command('display_message', $msg, 'error');
+ $OUTPUT->command('remove_from_attachment_list', $uploadid);
}
// send html page with JS calls as response
-$OUTPUT->command('show_attachment_form', false);
$OUTPUT->command('auto_save_start', false);
$OUTPUT->send('iframe');