title: Upload file using jquery ajax, and get result in $_FILES
body: <p>How to upload file using, I tried this but it's not working and also not giving me the result in $_POST on result page.</p>
  
  <pre><code>$.ajax({
                  type:'post',
                  url:'../investor/archive2.php',
                  enctype: 'multipart/form-data',
                  tmp_dir:'tmp',
                  //dataType: 'json',
                  processData: false, // Don't process the files
                  //contentType: false,
                   cache: false,
                  data:'action='+action+'&amp;title='+title+'&amp;datetime='+datetime+'&amp;name='+docfile,
                  success:function(result){
                      alert(result);
                  }
              });
  </code></pre>