You are here

function node_import_add_form_submit_upload_file in Node import 6

2 string references to 'node_import_add_form_submit_upload_file'
node_import_add_form in ./node_import.admin.inc
Creates a new import task by letting the user fill in a wizard.
node_import_list_files_form in ./node_import.admin.inc

File

./node_import.admin.inc, line 577

Code

function node_import_add_form_submit_upload_file($form, &$form_state) {
  $validators = array();
  $dest = node_import_directory();
  if ($file = file_save_upload('file_upload', $validators, $dest, FILE_EXISTS_RENAME)) {
    drupal_set_message(t('New file %name uploaded to %path.', array(
      '%name' => $file->filename,
      '%path' => $file->filepath,
    )));
    file_set_status($file, FILE_STATUS_PERMANENT);
    $form_state['values']['fid'] = $file->fid;
  }
  node_import_add_form_submit_reload($form, $form_state);
}