Skip to main content

Filter: gk/foundation/secure-download/remote-source

Allows serving files from remote URLs when local file doesn't exist.

Return an array with remote source configuration to enable remote downloads. The array should contain:

  • 'url' (required): The remote URL to download from.
  • 'filename' (optional): Custom filename to use for download.
  • 'size' (optional): File size in bytes for Content-Length header.

Parameters

NameTypeDescription
$remote_sourcearray|falseRemote source config or false to fail. Default false.
$file_pathstringThe original file path that wasn't found.
$argsarrayThe arguments passed to generate_download_url.

Since

  • TBD: TBD

Source

Defined in Components/SecureDownload.php at line 412