function file_aliases_file_download in File Aliases 6
Same name and namespace in other branches
- 7 file_aliases.module \file_aliases_file_download()
File
- ./
file_aliases.module, line 167 - Contains core functions for the File Aliases module.
Code
function file_aliases_file_download($filepath) {
$fileinfo = pathinfo(drupal_get_path_alias($_GET['q']));
return array(
'Cache-Control: public',
'Content-Disposition: attachment; filename="' . $fileinfo['basename'] . '"',
);
}