I'm trying to extend a form and add an upload file field from within a module, I can see the file field just fine, but it's empty when I submit the form, the enctype is set.
  $form['#attributes'] = array(
    'enctype' => "multipart/form-data"
  );
  $form['file_upload'] = array(
    '#type' => 'file',
    '#title' => 'Attach Image'
  );
custom form submit hook:
$form['#submit'][] = 'user_images_handler';
is being called, but when I dump the form, the file field is empty, and when I try to access it, it's empty as well.