Hidden Files enhances your site’s security posture by preventing direct file URL exposure. It offers a clean and manageable way to serve files dynamically within your templates, while retaining control over who can download them and when.
Feature | Details |
---|---|
Purpose | Secure controlled downloads of files associated with entries or Grid fields |
Template Tag | {exp:hidden_files:download_link} |
Notification Method | Email, with customizable recipients and alert criteria |
Output Variables | {hidden_files:url} , {hidden_files:title} |
Context Parameters | entry_id , field , field_id , col , row_id , file_id |
Grid Support | Yes - handles downloads from within Grid fields |
There's only one template tag
Generates a link for users to download a file
{hidden_files:url}
The full URL to download the file{hidden_files:title}
The title assocaited with the File (if any)entry_id
The entry the file is associated withfield
The short name for the field the file is assignedfield_id
The actual ID for the field. Improves performance.col
For Grid columns, the column the file is assignedrow_id
For Grid columns, The specific row the file is assigned (usually {row_id}
)file_id
The specific file to download. No other params needed when used.Channel Entry
{exp:hidden_files:download_link entry_id="{entry_id}" field="test_file"}
<p><a href="{hidden_files:url}">Download {hidden_files:title}</a></p>
{/exp:hidden_files:download_link}
Grid
{exp:hidden_files:download_link entry_id="{entry_id}" field_id="4" col="image" row_id="{blog_image:row_id}"}
<p><a href="{hidden_files:url}">Download {hidden_files:title}</a></p>
{/exp:hidden_files:download_link}
File
{exp:hidden_files:download_link file_id="1"}
<p><a href="{hidden_files:url}">Download {hidden_files:title}</a></p>
{/exp:hidden_files:download_link}