This module provides a handy solution for the following situations:

  • You want to offer some files for download to either anonymous or registered users
  • You don't want those files to be publicly accessible
  • You want to collect some data before granting access to the files
  • You want to be sure that the user gives a valid email address

Basic instructions (Drupal 10)

  1. Create a new Webform and add a 'Webform Protected Download' handler from the 'Emails/Handlers' sub-tab of the 'Settings' tab.
  2. Upload a file you wish to serve. You can add multiple handlers to the webform like this, in order to have multiple protected downloads.
  3. Make use of the Protected download link webform submission token in an email or confirmation message/page. This takes the form [webform_submission:protected_download_url]. If you have multiple protected download handlers, you can use sub-tokens for each handler ID to reference each one separately; e.g. [webform_submission:protected_download_url:webform_protected_downloads_2].
  4. When a user completes their webform submission, they will see the link in place of the token, which they can follow to download the protected file.

This introductory blog by the module maintainer provides more detail.

Dependencies

Drupal 7 Version

When you create a webform you can select which of the attached files you want to protect. You need to specify the webform field used for the confirmation mail (this must be a mandatory email field) and how long the download should be accessible after the user has submitted the form.
When a user submits a webform with protected files he will be sent an email with a link to the downloads page. The link contains an individual hash code that will be checked upon page load to verify the access. If verification fails access will be denied. If it succeeds the user will see the default private upload file listing with all protected files that are attached to the webform.

See the included README.txt.

Comparison to other modules

Check out the Comparison of gated file download modules for a list of similar modules that are compatible with modern Drupal. A similar comparison exists for Drupal 7.

How you could help

  • Test functionality and give feedback
  • Write a handbook page or enhance first time setup instructions for the README.md
  • Write and contribute automated tests
Supporting organizations: 
Drupal 10 compatible version

Project information

Releases