You are here

function _filebrowser_build_plupload_file_name in Filebrowser 7.4

Parameters

array $form_state:

Object $node:

Return value

string

File

./filebrowser.common.inc, line 754
Misc filebrowser common functions.

Code

function _filebrowser_build_plupload_file_name($node, $form_state) {
  $file_name = $_FILES['files']['name']["file"];

  //  if (!empty($form_state['values']["file_name"])) {
  //    $path_info_new = pathinfo($form_state['values']["file_name"]);
  //    $path_info_old = pathinfo($file_name);
  //    $file_name = $path_info_new['filename'];
  //    if (isset($path_info_old['extension'])) {
  //      $file_name .= ".{$path_info_old['extension']}";
  //    }
  //  }
  _filebrowser_load_files($node);
  $target = _filebrowser_encoding_to_fs($node, $node->file_listing['.']['full-path'] . "/" . $file_name);
  return $target;
}