diff --git form_example/form_example.module form_example/form_example.module
index ec95d17..c814233 100644
--- form_example/form_example.module
+++ form_example/form_example.module
@@ -119,6 +119,16 @@ function form_example_menu() {
     'file' => 'form_example_tutorial.inc',
     'weight' => 9,
   );
+  $items['examples/form_example/tutorial/10'] = array(
+    'title' => '#10',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('form_example_tutorial_10'),
+    'access callback' => TRUE,
+    'description' => t('Tutorial 11: Form with file upload'),
+    'type' => MENU_LOCAL_TASK,
+    'file' => 'form_example_tutorial.inc',
+    'weight' => 10,
+  );
   $items['examples/form_example/states'] = array(
     'title' => '#states example',
     'page callback' => 'drupal_get_form',
diff --git form_example/form_example.test form_example/form_example.test
index cfbeb1c..1891ce1 100644
--- form_example/form_example.test
+++ form_example/form_example.test
@@ -60,7 +60,6 @@ class FormExampleTestCase extends DrupalWebTestCase {
 
     $this->assertText(t('Enter a year between 1900 and 2000'));
 
-
     // #7
     $this->drupalPost('examples/form_example/tutorial/7',
       array('first' => t('firstname'), 'last' => t('lastname'), 'year_of_birth' => 1955),
@@ -105,6 +104,19 @@ class FormExampleTestCase extends DrupalWebTestCase {
     for ($i = 1; $i <= 4; $i++) {
       $this->assertText(t('@num: firstname @num lastname @num (@year)', array('@num' => $i, '@year' => 1950 + $i)));
     }
+
+    // #10
+    $url = 'examples/form_example/tutorial/10';
+
+    $this->drupalPost($url, array(), t('Submit'));
+    $this->assertText(t('No file was uploaded.'));
+
+    // Get sample images.
+    $images = $this->drupalGetTestFiles('image');
+    foreach ($images as $image) {
+      $this->drupalPost($url, array('files[file]' => drupal_realpath($image->uri)), t('Submit'));
+      $this->assertText(t('The form has been submitted and the image has been saved, filename: @filename.', array('@filename' => $image->filename)));
+    }
   }
 }
 
diff --git form_example/form_example_tutorial.inc form_example/form_example_tutorial.inc
index d6eaf1a..9e8a28d 100644
--- form_example/form_example_tutorial.inc
+++ form_example/form_example_tutorial.inc
@@ -25,6 +25,7 @@
  * @see form_example_tutorial_7()
  * @see form_example_tutorial_8()
  * @see form_example_tutorial_9()
+ * @see form_example_tutorial_10()
  *
  */
 function form_example_tutorial() {
@@ -682,3 +683,75 @@ function form_example_tutorial_9_submit($form, &$form_state) {
   }
   drupal_set_message($output);
 }
+
+//////////////// Tutorial Example 10 //////////////////////
+
+/**
+ * Example 10: A form with a file upload field.
+ *
+ * This example allows the user to upload a file to Drupal which is stored
+ * physically and with a reference in the database.
+ *
+ * @see form_example_tutorial_10_submit()
+ * @see form_example_tutorial_10_validate()
+ * @ingroup form_example
+ *
+ */
+function form_example_tutorial_10($form_state) {
+  // enctype="multipart/form-data" required by browsers to handle files.
+  $form = array(
+    '#attributes' => array('enctype' => "multipart/form-data"),
+  );
+
+  $form['file'] = array(
+    '#type' => 'file',
+  	'#title' => t('Image'),
+  	'#description' => t('Upload a file, allowed extensions: jpg, jpeg, png, gif'),
+  );
+
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Submit'),
+  );
+
+  return $form;
+}
+
+/**
+ * Validate handler for form_example_tutorial_10().
+ */
+function form_example_tutorial_10_validate($form, &$form_state) {
+	$file = file_save_upload('file', array(
+    'file_validate_is_image' => array(), // Validates file is really an image.
+    'file_validate_extensions' => array('png gif jpg jpeg'), // Validate extensions.
+  ));
+  // If the file passed validation:
+  if ($file) {
+    // Move the file, into the Drupal file system
+    if ($file = file_move($file, 'public://')) {
+      // Save the file for use in the submit handler.
+      $form_state['storage']['file'] = $file;
+    }
+    else {
+      form_set_error('file', t('Failed to write the uploaded file the site\'s file folder.'));
+    }
+  }
+  else {
+    form_set_error('file', t('No file was uploaded.'));
+  }
+}
+
+/**
+ * Submit handler for form_example_tutorial_10().
+ */
+function form_example_tutorial_10_submit($form, &$form_state) {
+  $file = $form_state['storage']['file'];
+  // We are done with the file, remove it from storage.
+  unset($form_state['storage']['file']);
+  // Make the storage of the file permanent
+  $file->status = FILE_STATUS_PERMANENT;
+  // Save file status.
+  file_save($file);
+  // Set a response to the user.
+  drupal_set_message(t('The form has been submitted and the image has been saved, filename: @filename.', array('@filename' => $file->filename)));
+}
