diff --git a/file_entity.pages.inc b/file_entity.pages.inc index 8f19218..607aea4 100644 --- a/file_entity.pages.inc +++ b/file_entity.pages.inc @@ -568,14 +568,14 @@ function file_entity_add_upload_multiple($form, &$form_state, $params = array()) */ function file_entity_add_upload_multiple_submit($form, &$form_state) { // Set the upload directory where the file should be dropped. - if (file_entity_upload_path_access()) { + if (file_entity_upload_path_access() && isset($form_state['values']['path'])) { // The current user has permission to specify the location. // Grab it from the submitted form. $upload_location = file_entity_upload_destination_uri(array( 'file_directory' => $form_state['values']['path'], )) . "/"; } - else if (!empty($form['upload']['#upload_location'])) { + else if (file_entity_upload_path_access() && !empty($form['upload']['#upload_location'])) { // If the form specfied a directory at the outset, use that. $upload_location = $form['upload']['#upload_location'] . '/'; }