title: Angular POST multipart/form-data with application/json & text/csv
body: <p><strong>PROBLEM</strong></p>
  
  <p>Trying to send a multipart/formdata post request with a file upload and model data in JSON.
  Not sure why there are not much working references, couldn't make work the ones which are there. 
  Might be doing something wrong as well or making it more complicated too. </p>
  
  <p><strong>REFS TRIED</strong></p>
  
  <ul>
  <li><a href="http://shazwazza.com/post/uploading-files-and-json-data-in-the-same-request-with-angular-js/" rel="nofollow noreferrer">uploading-files-and-json-data-in-the-same-request-with-angular-js</a></li>
  <li><a href="https://stackoverflow.com/a/9082243">a nice explanation about boundary and multipart</a></li>
  <li><a href="https://stackoverflow.com/q/28023703">some so question</a></li>
  </ul>
  
  <p><a href="http://jsfiddle.net/ZG9re/2849/" rel="nofollow noreferrer"><strong>QUICK FIDDLE WITH MY TRIES</strong></a></p>
  
  <p><strong>QUESTION</strong></p>
  
  <p>Somehow json content on my post request payload doesn't seem to contain Content-Type: application/json identified automatically. </p>
  
  <p>Even setting the content-type as undefined/false for the POST didnt work.
  Need some suggestion on what would be the problem or how to fix this?</p>
  
  <p><strong>NETWORK LOG FOR FIDDLE UPLOAD</strong>   </p>
  
  <p>Request Headers</p>
  
  <pre><code>Accept:application/json, text/plain, */*
  Content-Length:361
  Content-Type:multipart/form-data; boundary=----WebKitFormBoundary7NukqN6GtRwugBSJ
  </code></pre>
  
  <p>Request Payload</p>
  
  <pre><code>------WebKitFormBoundary7NukqN6GtRwugBSJ
  Content-Disposition: form-data; name="file"; filename="sample.csv"
  Content-Type: text/csv
  
  
  ------WebKitFormBoundary7NukqN6GtRwugBSJ
  Content-Disposition: form-data; name="data"
  
  {"name":"a good name","comments":"some comments"}
  ------WebKitFormBoundary7NukqN6GtRwugBSJ--
  </code></pre>