title: FormData server side NodeJS
body: <p>I'm developing a web application using nodejs server-side. I'm trying to send pdf files from client to server.</p>
  
  <p>Client:</p>
  
  <pre><code>var files = new FormData();
  var count = 0;
  $('#tableSlideId tr').each(function() {
  
      var inputForm = $(this).find("th:first").children();
      file = inputForm[0].files[0];
      files.append((count++).toString(),file);
  
  });
  
  $.ajax({
      type: "POST",
      url: "/sendFiles",
      data: files,
      contentType: false,
      processData: false,
  
  }).done(function(err){
  
      var text ="";
      if(err) {
  
          text = "Upload FAILED! Retry ...";
  
      } else {
  
          text = "Upload SUCCES!";
  
      }
  
      alert(text);
  
  
  
  });
  </code></pre>
  
  <p>I think the client side is ok, infact if I use this loop:</p>
  
  <pre><code>for(var p of files)
    console.log(p);
  </code></pre>
  
  <p>I correctly visualize all the elements that I want to send to the server.</p>
  
  <p>Server:</p>
  
  <pre><code>app.post('/sendFiles', function(req,res) {
  
      console.log("---&gt;",req.body);
      res.end();
  
  });
  </code></pre>
  
  <p>Now in the server I have no idea how to visualize the data that I send, infact req.body is empty.</p>
  
  <p>I don't know if this is the right way but my goal is to load some pdf files form the client, send to the server and after store them in a mySql dmbs.
  Thank you.</p>