Form Api File upload I have the following code in my form.

$form['new']['upload'] = array(
  '#type' =&gt; 'file',
  '#title' =&gt; t(''),
  '#size' =&gt; 40,
);


On the submission handler, it returns the file name but it does not save the file and return a file object. What else do I need to do?

What I am trying to do is create a block where you can upload a file that it is saved in a node's file field.
Take a look at file_save_upload() and the functions which call it.

The function will handle the validation of the file, and save it to a new location. In Drupal 7 this also adds the file to file_managed table.
Note that the file will be stored as a temporary file, so make sure to set the status of the file to permanent afterwards.

You will probably want to implement the file_save_upload function inside your form's validation hook (before the submit handler), so you can alert the user if the file upload failed, or did not meet your validation requirements.

If the name of the image field you are trying to validate is image, then the first parameter of file_save_upload should be image, as such:

$path = file_save_upload('image', ...);

This function will then return the path on the server to which the image was uploaded (so you can for example store that path in a custom database field).