CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 14:52:24 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=BWM6%2BPEYjinCc%2FpebhmN2bKMjkgagAzn6RnOO%2FvE5ZZA%2FH88vQbCf8FPmWc9XeMG0EPDrHIQkGwaDLB6YaO4bSREQADffKaYP7qIwq2Zj3NPSoz%2B"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 98cf2e5c9e40a403-BLR
gform_secure_file_download_location - Gravity Forms Documentation
gform_secure_file_download_location
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', 'your_function_name', 10, 3 );
To target a specific form append the form id to the hook name. (format: gform_secure_file_download_location_FORMID)
add_filter( 'gform_secure_file_download_location_5', 'your_function_name', 10, 3 );
Parameters
- $secure_download_location bool
If the secure location should be used. Defaults to true.
-
$file string
The URL of the file.
-
$field GF_Field_Fileupload
The field.
Example
The following would apply to all forms.
add_filter( 'gform_secure_file_download_location', '__return_false' );
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
$secure_download_location = apply_filters( 'gform_secure_file_download_location', $secure_download_location, $file, $this );
$secure_download_location = apply_filters( 'gform_secure_file_download_location_' . $this->formId, $secure_download_location, $file, $this );
This filter is located in class-gf-field-fileupload.php.