This project is not covered by Drupal’s security advisory policy.

This module makes it possible for public and private download to co-exists on Apache web servers.

This module is developed by Thomas Barregren at NodeOne.

The development of this module has been sponsored by:

Protected Download vs Private Upload

Both Protected Download and Private Upload have the same effect, making some files public and other private, but there purposes are quite different: Private Upload is designed to empower the editors to have full control over which files to be public or private. Protected Download is designed to work with Upload Path to "automagically" make attached files public or private depending on the node type. The two modules don't compete with each other, but provide two different solutions on two different needs.

The main differences are:

  • Protected Download is extremely light-weighted, only 5 lines of code.
  • It requires no user interaction, i.e. checking a private checkbox.
  • There are no known conflicts with other modules, e.g. Upload Path, Upload Image or Comment Upload.

Install

  1. Install and enable this module as usually.
  2. Go to admin/settings/file-system and select public download method.
  3. For each directory whose content should be downloaded through the private download method, create a .htaccess file with following content: Deny from all.
  4. Add following line to the .htaccess file in the Drupal home directory: ErrorDocument 403 /index.php.

Project information

Releases