Ticket modified by Niccolo Pierini at 2012/10/09 16:20
Tracking SystemPatches
CategoryFelamiMail
VersionVersion 1.8.004
StatusOpen
ResolutionNone
Completed10%
Priority5 - medium
Created byGregor Burck
Created on2011/02/03 14:54
Assigned toKlaus Leithoff
Summary#2833 - add multiple files
Changes:
1. html form in == felamimail/templates/composeForm.tpl:250 ==
2. egroupware has to handle incoming file-array in == felamimail/inc/class.felamimail.uicompose.inc.php:520 == fileSelector()
<?php
if(is_array($_FILES["addFileName"])) {
#phpinfo();
//_debug_array($_FILES);
$success = false;
if (is_array($_FILES['addFileName']['name'])) {
foreach($_FILES['addFileName']['name'] as $key => $filename) {
if($_FILES['addFileName']['error'][$key] == $UPLOAD_ERR_OK) {
$formData['name'] = $_FILES['addFileName']['name'][$key];
$formData['type'] = $_FILES['addFileName']['type'][$key];
$formData['file'] = $_FILES['addFileName']['tmp_name'][$key];
$formData['size'] = $_FILES['addFileName']['size'][$key];
$this->bocompose->addAttachment($formData);
$success = true;
}
}
} else {
if($_FILES['addFileName']['error'] == $UPLOAD_ERR_OK) {
$formData['name'] = $_FILES['addFileName']['name'];
$formData['type'] = $_FILES['addFileName']['type'];
$formData['file'] = $_FILES['addFileName']['tmp_name'];
$formData['size'] = $_FILES['addFileName']['size'];
$this->bocompose->addAttachment($formData);
$success = true;
}
}
if ($success === true) {
print "";
} else {
print "";
}
}
?>
Comment by Niccolo Pierini at 2012/10/09 16:20:
Hi, I don't understand how use your patch..
This function is very very important for me!
Can you tell me what files i must edit?
Thanks!
Comment by Moe Szyslak at 2011/02/05 19:41:
We use that patch since nearly a week without any problems.
Our users are very happy about that feature.
Tested with firefox 3.6.13 and chrome 8.x. Other sources say that it works also with Konqueror and Safari but i dunno the versions of these.
It works not with IE X.x , but who the f*** use that browser...
Comment by Klaus Leithoff at 2011/02/03 14:57:
Thanks for supplying the patch.
I am testing this currently in trunk.
Linked entries:
https://community.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2833&no_popup=1
|