How do I incorporate a browser file search into a Drupal form? This question extends a previous one. The previous answer stated that the pop-up window to search the user's computer for a file to upload is called using .  I am not certain how to make the call from within the form_submit function and have searched the core code for an example without success.  I know that add content has a widget to add an image file, but I cannot find the code generating it. I even did a file search for the word "Browse" which is the title of the button without finding a single file.

Does anyone have an example of how I would direct a call to a browser function from within the Drupal form?  OR Does anyone know where the add content form widget for adding a file is at?
To output a file select form element in a Drupal form, you simply add a file or managed file element.

$form['upload'] = array(
    '#type' =&gt; 'file',
    '#title' =&gt; t('Choose a file')
  );
)