title: Not Able To Get The Image Uploaded To Node.js
body: <p><strong>Client Side Code</strong></p>
  
  <pre><code>$(document).ready(function(){
    var fileSelected;
    console.log("Document Loaded");
    $('#userPhotoInput').on('change', function(e){
        fileSelected = e.target.files[0];  
        console.log(fileSelected.name);   
    });
  
    $('#uploadForm').submit(function(e){
        e.preventDefault();
        console.log("Submit Clicked");
        $.ajax({
            type:'POST',
            url :'/upload',
            processData: false,
            contentType: false,
            beforeSend: function(request) {
                request.setRequestHeader("Content-Type", fileSelected.type);
            }
            success : function(data){
                console.log(data);
            },
            error : function(error){
                console.log(error)
            }
        });
        return false;
    });
  });
  </code></pre>
  
  <p><strong>Server Side</strong></p>
  
  <pre><code>// Global app configuration section
  app.set('views', 'cloud/views');  // Specify the folder to find templates
  app.set('view engine', 'ejs');    // Set the template engine
  app.use(express.bodyParser());    // Middleware for reading request body
  app.post('/upload',function(req,res){
      var response = "";
      for(var key in req){
          console.log(key);
      response += ((!response.length) ? "" : ",") + key;
      }
      res.send(response.split(","));
  });
  </code></pre>
  
  <p>The content length I'm getting it on server, which is well and good. But unable to get the data from the request. I try to get the req.files but there is no property like this in the request. Also req.body is returning an empty Object. Can Any one guid me on this ?</p>
  
  <p><strong>Server Log</strong></p>
  
  <pre><code>Input: {"method"=&gt;"POST", "url"=&gt;"/upload", "headers"=&gt;{"version"=&gt;"HTTP/1.1", "host"=&gt;"myhost", "user-agent"=&gt;"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36", "content-length"=&gt;"2348", "accept"=&gt;"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "accept-encoding"=&gt;"gzip,deflate,sdch", "accept-language"=&gt;"en-US,en;q=0.8,ar;q=0.6", "cache-control"=&gt;"max-age=0", "content-type"=&gt;"multipart/form-data; boundary=----WebKitFormBoundaryHsBgtmA9Sojnhbpx"}}
  </code></pre>