Skip to main content

Filter: gk/gravityview/fields/fileupload/secure-links/allowed-extensions

Filters the file extensions that are allowed to bypass secure download URLs.

By default, only media files (images, audio, video) can bypass secure downloads. Use this filter to customize which file types are allowed to use direct URLs. Special case: Return an array containing '*' to allow ALL file types to bypass secure downloads. Use with extreme caution as this exposes all uploaded files.

Parameters

NameTypeDescription
$media_extensionsarrayArray of file extensions that can bypass secure downloads. Default: merge of image, pdf, audio, and video extensions. Use array('*') to allow all file types.
$field\GF_Field_FileUploadThe file upload field.
$field_settingsarrayGravityView settings for the field.
$context\Template_ContextThe template context.
$file_pathstringThe file path.

Since

Source

Defined in includes/fields/class-gravityview-field-fileupload.php at line 673