gform_secure_file_download_url

Description

Allows for manual filtering of the download URL to handle conditions such as unusual domain mapping and others.

Usage

The base filter which would run for all forms would be used like so:

add_filter( 'gform_secure_file_download_url', 'your_function_name', 10, 2 );

Parameters

  • $download_url string

    The URL from which to download the file.

  • $field GF_Field_Fileupload

    The field object for further context.

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms 2.1.1.1.

Source Code

This filter is located in GF_Field_FileUpload::get_download_url() in includes/fields/class-gf-field-fileupload.php.