Options
Attachments in v1pre3
I've just installed v1pre1. Installing the attachments extension seems to work fine: both my old pre-upgrade and newly made attachments show up nicely. But when I try to download the files i get corrupted files. The files I save using the browser also has the wrong names (only the first word, and no .doc)
I have verified that the files in the uploads folder are intact.
Any ideas what could be wrong here?
0
This discussion has been closed.
Comments
with friendly urls on the link is discussion/14/&Download=file.doc --> comments.php?CommentID=14&Download=file.doc
too late to think to that now...
Here the problem is just that the friendly link to donwload file.doc should be "discussion/##/?&&Download=file.doc" and not "discussion/##/?&Download=file.doc".
"discussion/##/" is not a problem since this rule in .htaccess, "RewriteRule ^discussion/([0-9]+)/$ comments.php?DiscussionID=$1 [QSA,L]" transform "discussion/##/" in "comments.php?DiscussionID=##".
I believe a quick fix would be to edit the line 329 of /extensions/Attachments/default.php; replace:
$AttachString .= '<a href="' . GetUrl($Context->Configuration, 'comments.php', '', 'CommentID', $CommentID, '', '&Download='. urlencode($FileName)) .'">'. $FileName .'</a>';
$AttachString .= '<a href="' . $Configuration['BASE_URL] . 'comments.php?CommentID=' . $CommentID . '&Download='. urlencode($FileName) .'">'. $FileName .'</a>';