When opening a direct link to an Attachment Links node path in Internet Explorer (as in copy/pasting the URL http://site.com/node/120/attachment into the address bar, or clicking the link in an email), the file is not downloaded and I receive a warning message:

Internet Explorer cannot download attachment from [site].
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

Clicking the link in page _does_ trigger the download just fine, however. This happens in IE6 and IE7. Have not tested IE8 for this behavior.

CommentFileSizeAuthor
#1 attachment_links_iefix.patch618 bytesvinmassaro
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vinmassaro’s picture

Status: Active » Needs review
FileSize
618 bytes

Had a chance to do some digging and found this: http://drupal.org/node/163298

Added the following lines to attachment_links.module and direct linking to Attachment Links paths works fine in IE now:

$headers[] = 'Expires: 0';
$headers[] = 'Cache-Control: private';
$headers[] = 'Pragma: cache';

Patch attached.

Todd Nienkerk’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Assigned: Unassigned » Todd Nienkerk
Status: Needs review » Fixed

Committed patch to 6.x branch (6.x-1.x.dev). Will issue a 6.x-1.1 release soon.

Todd Nienkerk’s picture

Version 6.x-1.1 released.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.