Some of my files are zips, and their downloads are counted for statistical purposes. Other files are icons and screenshots, the private downloading of which causes unnecessary overhead. On my site, calling system/files/* actually means a delay of several seconds while the site is bootstrapped - harmless when downloading a large file that takes longer anyway, but ugly when it slows the page load.
Adding an extra option to admin/settings/file-system and a check to file.inc#file_create_url, I have successfully added a "bypass" for certain files based on whether they match one of the entered patterns. If they're exempt, the URL will link directly to the file, otherwise it goes through system/files.
Before I clean this up for patch submission, I'd like to know if this can work at all or has been done before, etc...
Comments
Comment #1
g99k commentedI don't know why no one has answered to this yet, but I'm very interested in anything that can bypass the all-or-nothing approach for private downloads in Drupal 6. Please post your patch, if you're still around.
Comment #2
anarcat commentedplease do not change the issue title without a good reason.