DescriptionUsageParametersExamplePlacementSource Code
Description
By default the real location of the uploaded file will be hidden. The download URL will be generated with a security token to prevent guessing or enumeration attacks to discover the location of other files.
Return FALSE to display the real location.
Not recommended – use with caution!
Usage
The following would apply to all forms.
add_filter('gform_secure_file_download_location', '__return_false');
Parameters
$secure_download_location bool
If the secure location should be used. Defaults to true.
$file string
The URL of the file.
$this GF_Field_Fileupload
The field.
Example
$secure_download_location = apply_filters( 'gform_secure_file_download_location_' . $this->formId, $secure_download_location, $file, $this );
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in class-gf-field-fileupload.php.