function content_get_uploaded_file
Search API
| 7.x content.module | content_get_uploaded_file($fid) |
| 6.x content.module | content_get_uploaded_file($fid) |
11 calls to content_get_uploaded_file()
- alerts.module in modules/
alerts/ alerts.module - module file for Alerts
- alerts_content_load in modules/
alerts/ alerts.module - Implements hook_content_load.
- content.module in modules/
content/ content.module - content_content_load in modules/
content/ content.module - Implementation of content's hook_content_load
- content_edit_content_form in modules/
content/ content.module - This form lets the user edit some piece of content
File
- modules/
content/ content.module, line 1327
Code
function content_get_uploaded_file($fid) {
$res = db_query("SELECT * FROM content_files WHERE fid = ?", array($fid));
$cur = db_fetch_array($res);
if ($cur) {
$temp = explode(".", $cur ['filename']);
$ext = $temp [count($temp) - 1]; // get the extension.
$cur ['full_filename'] = fp_get_files_path() . '/content_uploads/' . $cur ['filename'];
// also get the URL for downloading this file.
// *** Always handle downloads through FlightPath, for security reasons. ***
$cur ['url'] = fp_url('content-files/handle-download/' . $cur ['fid']);
$cur ['ext'] = $ext;
}
return $cur;
}
