function hook_file_download_headers_alter in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 8.2 file_entity.api.php \hook_file_download_headers_alter()
- 7.3 file_entity.api.php \hook_file_download_headers_alter()
Alter file download headers.
Parameters
array $headers: Array of download headers.
object $file: File object.
1 invocation of hook_file_download_headers_alter()
- file_entity_download_page in ./
file_entity.pages.inc - Menu callback; download a single file entity.
File
- ./
file_entity.api.php, line 335 - Hooks provided by the File Entity 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';
}