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
Comment #1
anrikun CreditAttribution: anrikun commentedIndeed 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.
Comment #2
TommyK CreditAttribution: TommyK commentedI appreciate the quick reply! Apologies for not seeing that issue. The age of that issue does not leave me with much hope, though.
Comment #3
anrikun CreditAttribution: anrikun commentedCross post :-) I've just added more info to my previous post.
Comment #4
roball CreditAttribution: roball commentedTommyK, 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.
Comment #4.0
roball CreditAttribution: roball commentedadd link to file_aliases issue
Comment #5
johnhanley CreditAttribution: johnhanley commentedClosing due to Drupal 6 end-of-life cycle.