While testing attachment_links on a project using a private:// file-field, I got 404 errors. I discovered two things:

Here's a patch I wrote to address both issues.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ultimateboy’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
1.14 KB

Great patch which solves my issues with private files and the attachment_links module.

I've fixed the root of the patch (you had originally patched from your drupal root and not the module's root).

No real changes to the patch and thus I'm marking RTBC.

ultimateboy’s picture

I should note that before adding this patch, links to node/#/attachment/newest were downloading with a filename of "newest" instead of the desired filename. The fact that this patch adds the header() information also fixes this issue.

rupl’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, thanks for the confirmation and re-roll. Committed to dev: ce0d5506

Status: Fixed » Closed (fixed)

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