title: how to get the content of the file uploaded with input type file using JQuery
body: <p>Firstly sorry for my English.</p>
  
  <p>How can i access the content of the file uploaded with HTML->Input type="file" tag in Jquery.</p>
  
  <p>form code is:- </p>
  
  <pre><code>&lt;div id="import_csv_dialog" style='display:none'&gt;
          &lt;form method='post' enctype='multipart/form-data'&gt;
          &lt;table&gt;
          &lt;tr&gt;&lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td&gt;File Location:&amp;nbsp;&lt;/td&gt;
          &lt;td&gt;&lt;input type="file" name="file" id="file"/&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;&lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td colspan="2"&gt;&lt;a style="cursor:pointer" class="css_btn" onclick="importCsv()"&gt;Import&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
          &lt;/table&gt;
          &lt;/form&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p><strong>Jquery Code is: -</strong> </p>
  
  <pre><code>function importCsv()
  {
  if($('#file').val()=="")
  {
      jQuery.noticeAdd({
                      text: 'Please select a file',
                      type: 'error'
                  });
      return;
  }
  
  var file_id=$('#file').val();
  var url = "&lt;?php echo $this-&gt;baseUrl; ?&gt;/Ordermanagement/importcsv/"+file_id;
  var data = {file_id: file_id};
  
  $.post(url, data, function(data, textStatus, XMLHttpRequest)
  {
      $('#gridList7').trigger("reloadGrid");
      jQuery.noticeAdd({
                        text: 'Data Imported successfully',
                        type: 'success'
                      });
      $('#import_csv_dialog').dialog('close');
  });
  </code></pre>
  
  <p>}</p>
  
  <p>In this code I am calling the zend controller function importcsv with the file name as the parameter. this is a .csv file. in this php file i will insert the content of this csv file to my database. But in this function, i am only able to get the file name as parameter, not the content or the path. how can i get the content of this file ? This is working the simple PHP with the help of $_FILES["file"]["tmp_name"]. How can i get the tmp_name  in Jquery.</p>
  
  <p>Thanks very much </p>