How to get a file from local disk then pass that to a POST method to upload to server
<p>I have an input tag of type <code>file</code>. I use this to get a file from my local disc. What I need is a way to get and hold that file so I can POST it to a server. </p>

<pre><code>&lt;input type='file'&gt; 

//I now want to hold this file and pass this to this ajax post method

$.ajax({
  type: "POST",
  url: url, //I have URL, this isn't a problem
  data: data, // do I place response here ? 
  success: function(){ alert('file posted')
  dataType: dataType // ? 
})
</code></pre>