It seems like this module defaults to streaming files through PHP, whereas the mod_xsendfile should make this less system-intensive and hence faster.
Correct me if I'm wrong, but there is no integration with Drupal's XSend project or the PHP module directly, right? Is there a way that this could be easily implemented?
Perhaps simply modifying the file-headers to be like this?
X-Sendfile: $path_to_somefile
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=\"$somefile\"
However, X-Sendfile needs to access variables ("$path_to_somefile" path and the "$somefile" filename).. So it seems like some sort of actual integration would have to be done on the maintainers' ends?
Or does this exist already somehow?
Comment | File | Size | Author |
---|---|---|---|
#13 | private_download_xsend.tar_.gz | 2.63 KB | Offlein |
#6 | private_download_xsend.tar_.gz | 2.52 KB | Offlein |
Comments
Comment #1
johnhanley CreditAttribution: johnhanley commentedI'm all for making things faster and more efficient. However, I'm inclined not to make this a huge priority given that the module currently works as described. That said, I'm willing to consider a patch that would make XSend as an option.
Comment #2
johnhanley CreditAttribution: johnhanley commentedComment #3
ñull CreditAttribution: ñull commentedI recently looked into the xsend module and you might be interested in the top three issues where I posted some comments that might be helpful for you.
Comment #4
Offlein CreditAttribution: Offlein commentedThank you, ñull.. I actually have a developer who's about to finish a module that integrates Private Download (separately) with the x-sendfile plugin. We'll post it here for Bacteria Man probably tomorrow.
Sorry I hadn't mentioned anything about this.
Comment #5
johnhanley CreditAttribution: johnhanley commented@ñull,
Thanks for your interest.
@Offlein,
Thanks for your efforts regarding implementing X-Sendfile with Profile Download. I assume this will be a configurable option, which includes checking the existence of the X-Sendfile module. Will your contribution be in the form of a patch and a full modified version of the module? I'd prefer the former, which is developed with the latest 6.x-1.3 release.
John
Comment #6
Offlein CreditAttribution: Offlein commentedBacteria Man, I'm afraid it's a broken out into an alternate module that plays with yours. That module adds a checkbox to the Private Download settings page.
FWIW, the XSend Drupal module is not required.
I've attached the module here - all work was done on contract by my awesome developer wundo. Submitted with his approval.
Comment #7
johnhanley CreditAttribution: johnhanley commented@Offlein,
Thanks for posting the your customized version of Private Download. I'm sure ñull and other users will find it useful.
Cheers,
John
Comment #8
Offlein CreditAttribution: Offlein commentedYou're welcome. I hope so!
Since you're marking this won't fix, though, does that mean you don't have any interest in including it as an optional module as part of the Private Download project? That'd be ideal for us I think, but we could look into creating a project page for it, separately as well.
Comment #9
johnhanley CreditAttribution: johnhanley commentedNot necessarily. I think it makes the most sense to have one version of the module with a configurable option to use X-Sendfile. I haven't personally tested your version of the module, but I assume this is the way it works (?)
Comment #10
Offlein CreditAttribution: Offlein commentedYes. At /admin/settings/private_download you get a new checkbox. So you have to enable the module then also check the checkbox.
My vote is to distribute it in the Private Downloads project tarball as a submodule, like how Notifications module has a bunch of submodules which you may or may not want.
Comment #11
johnhanley CreditAttribution: johnhanley commentedSure, I agree. Let me give it a whirl (hopefully this weekend) and report back with my impressions. Assuming everything is a go, I'll put together a new release.
Thanks again for the time (and any expense) you spent put this together.
Regards,
John
Comment #12
johnhanley CreditAttribution: johnhanley commentedComment #13
Offlein CreditAttribution: Offlein commentedThe pleasure's all mine! Here's a newer version that addressed a few typos and other stuff. Specifically, in some PHP configurations the function apache_get_modules() will not work, so I added a check for that. If it can't detect whether you have XSend enabled, it will allow you to still turn on the module, but throw a warning. This is in private_download_xsend_enabled().
Comment #15
johnhanley CreditAttribution: johnhanley commentedClosing due to Drupal 6 end-of-life cycle.