Fix #2247
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index f343b6c..d6e3e85 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -228,13 +228,10 @@
 	 */
 	function form_upload($data = '', $value = '', $extra = '')
 	{
-		if ( ! is_array($data))
-		{
-			$data = array('name' => $data);
-		}
-
+		$default = array('type' => 'file', 'name' => '');
+		is_array($data) OR $data = array('name' => $data);
 		$data['type'] = 'file';
-		return form_input($data, $value, $extra);
+		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
 	}
 }