You are here

function _webform_table_file in Webform 7.4

Same name and namespace in other branches
  1. 6.3 components/file.inc \_webform_table_file()
  2. 7.3 components/file.inc \_webform_table_file()

Implements _webform_table_component().

File

components/file.inc, line 537
Webform module file component.

Code

function _webform_table_file($component, $value) {
  $output = '';
  $file = webform_get_file($value[0]);
  if (!empty($file->fid)) {
    $output = '<a href="' . webform_file_url($file->uri) . '">' . check_plain(webform_file_name($file->uri)) . '</a>';
    $output .= ' (' . (int) ($file->filesize / 1024) . ' KB)';
  }
  return $output;
}