title: File Upload with jQuery AJAX and Handler (ashx) not working
body: <p>I'm trying to upload an image file with jQuery AJAX and a generic handler. But it seems that the file isn't being passed to the handler.
  After submit <code>context.Request.Files[0];</code> is always null :-/</p>
  
  <p>What am i doing wrong?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form id="form1" runat="server" method="post" enctype="multipart/form-data"&gt;
  
      &lt;input name="file" id="file" type="file" /&gt;
      &lt;input id="save" name="submit" value="Submit" type="submit" /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$().ready(function ()
  {
      $('#file').change(function () 
      {
          sendFile(this.files[0]);
      });
  });
  
  function sendFile(file) 
  {
      $.ajax({
          type: 'post',
          url: 'FileUpload.ashx',
          data: file,
          success: function () {
              // do something
          },
          xhrFields:
          {
              onprogress: function (progress) 
              {
                  // calculate upload progress
                  var percentage = Math.floor((progress.total / progress.totalSize) * 100);
  
                  // log upload progress to console
                  console.log('progress', percentage);
  
                  if (percentage === 100) {
                      console.log('DONE!');
                  }
              }
          },
          processData: false,
          contentType: 'multipart/form-data'
      });
  }
  </code></pre>
  
  <p>ASHX:</p>
  
  <pre><code>public void ProcessRequest (HttpContext context) 
  {
      HttpPostedFile file = context.Request.Files[0];
  
      if (file.ContentLength &gt; 0)
      {
          //do something
      }
  }
  </code></pre>