1 file.api.php hook_file_download_headers_alter(array &$headers, $file)

Alter file download headers.

Parameters

array $headers: Array of download headers.

object $file: File object.

File

core/modules/file/file.api.php, line 406
Hooks for file module.

Code

function hook_file_download_headers_alter(array &$headers, $file) {
  // Instead of being powered by PHP, tell the world this resource was powered
  // by your custom module!
  $headers['X-Powered-By'] = 'My Module';
}