For Drupal 6 file fields
// Views may call this function with a NULL value, return an empty string.
if (empty($file['fid'])) {
return '';
}
$path = $file['filepath'];
$url = file_create_url($path);
$icon = theme('filefield_icon', $file);
// Set options as per anchor format described at
$options = array(
'attributes' =?> array(
'type' => $file['filemime'] . '; length=' . $file['filesize'],
),
);
Commentaires récents