Attachement file problem: Explorer cannot download ... from ... : possible solution ?
Carl Provencher
Carl.Provencher@sit.ulaval.ca
Fri, 14 Dec 2001 11:00:24 -0500
A major problem we have with IMP, is about attachement and IE and the a lot of our user use IE.
When I click on filename link, a window open and I receive this error message from IE:
Explorer cannot download ... from ...
In a message view, I compage 2 links (filename link and download.gif link) from source of message frame.
<td class="item1" width="100%"><table cellspacing="2" cellpadding="1"><tr valign="middle"><td><img src="/horde/graphics/mime/pdf.gif" height="16" width="16" border="0" alt="" /></td><td>2</td><td><a href="" onclick="view('113', '2', 'c3ecc19dfecd3117e491b31928dc2fb6'); return false;" onmouseout="status='';" onmouseover="status='Voir formulaire.pdf'; return true;">formulaire.pdf</a></td><td>application/pdf</td><td>7,68 KB</td><td><a href="view.php?Horde=ae0b6ec3d6fcab6d76b139428d719407&mailbox=INBOX&index=33&array_index=11&id=2&actionID=112&mime=c3ecc19dfecd3117e491b31928dc2fb6&f=/formulaire.pdf" onmouseout="status='';" onmouseover="status='Télécharger formulaire.pdf'; return true;"><img src="/imp/graphics/download.gif" border="0" alt="Téléchargement" /></a></td></tr>
I compage view.php? code in previous line and in view function
1. With download.gif we have this:
...<a href="view.php?Horde=ae0b6ec3d6fcab6d76b139428d719407&mailbox=INBOX&index=33&array_index=11&id=2&actionID=112&mime=c3ecc19dfecd3117e491b31928dc2fb6&f=/formulaire.pdf" onmouseout="status='';" onmouseover="status='Télécharger formulaire.pdf'; return true;"
2. and in function view
window.open('view.php?Horde=ae0b6ec3d6fcab6d76b139428d719407&mailbox=INBOX&index=33&array_index=11' + '&id=' + part + '&actionID=' + action + '&mime=' + mime, '13344590773c1a1bba0824e33' + tr(part), param);
I suggest the problem occure because we find "&mailbox" rather "&mailbox" in url ?
The function generate first one is in horde/imp/lib/IMP.php at line 829
$row .= Horde::link(Horde::url('view.php?mailbox=' . urlencode($imp['mailbox'])) . '&index=' . Horde::getFormData('index') . '&array_index=' . Horde::getFormData('array_index') . "&id=$mime->imap_id&actionID=" . ($mode == VIEW_ATTACH ? DOWNLOAD_ATTACH : SAVE_MESSAGE) . '&mime=' . SessionCache::putObject($mime) . '&f=/' . urlencode(MIME::decode($mime->name)), sprintf(_("Download %s"), $mime->description));
Can you confirm if it's problem and have you a path (or just simply rempace "&" by "&").
Thank's a lot
--
____________________________________________________________________
Carl Provencher
S.I.T., Université Laval
Tél.: (418) 656-2131 poste 8719