When the File Aliases module is installed and inline is selected for the download behavior option, private PDFs are downloaded instead of displayed in the browser. No "Save As…" dialog is presented either. As soon as the File Aliases module is disabled private PDFs are displayed in the browser as expected.

I don't know enough at this point to dive into the code and make any suggestions, but I wanted to get this issue out there.

I imagine this issue will need to be addressed in the File Aliases module, but it would be fantastic if Private Download and File Aliases could work together. To me, File Aliases is a natural extension of FileField Paths which is recommended a number of times in this issue queue.

A similar feature request has been filed in the File Aliases issue queue. See: #1653282: conflict with private_download module

Comments

anrikun’s picture

Indeed this should be addressed in the File Aliases module.
See #903960: 2 sets of headers being sent

Edit: I think that File Aliases should simply not return any header in its implementation of hook_file_download().
It's not its job to grant access to private files.

TommyK’s picture

I appreciate the quick reply! Apologies for not seeing that issue. The age of that issue does not leave me with much hope, though.

anrikun’s picture

Cross post :-) I've just added more info to my previous post.

roball’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Component: Miscellaneous » Code

TommyK, you may want to try the patch I have attached to #2010092: Unset the "Content-Disposition" header field instead of sending a disposition-type "inline" to see if it fixes the problem. I did not ever use the File Aliases module, so I cannot confirm myself at this time.

roball’s picture

Issue summary: View changes

add link to file_aliases issue

johnhanley’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Closing due to Drupal 6 end-of-life cycle.