title: Sending csv through Ajax
body: <p>I'm trying to senda csv file opened with JS to the method written in C# where csv file will be parsed and added to database.</p>
  
  <p>I have no problem with opening file and getting its contents.
  But whatever I do with my Ajax call I receive empty data in the method CreateFromFile.
  here you can see my code:</p>
  
  <pre><code>var a = fr.result;
  $.ajax({
  url: "/DeviceInstance/CreateFromFile",
  type: "POST",
  datatype: "html",
  data: a,
  error: function (data) {
      alert("Dodanie  nie powiodło się  Jeden lub wiecej numerów seryjnych nie są nikalne " + data);
  },
  success: function (data) {
      if (data.length &gt; 0) {
          alert(data);
      }
      else {
          alert("Operacja zakonczona sukcesem")
      }
    }
  });
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>[HttpPost]
  public JsonResult CreateFromFile(object data)
  {
  
      return Json("Sukces");
  }
  </code></pre>
  
  <p>I'm asking how should i modify my code to make things work?</p>
  
  <p>here : fr.result:</p>
  
  <pre><code>samsung;galaxy ;s3;1234567
  samsung;galaxy ;s4;54321
  samsung;galaxy ;s5;34567yu8
  </code></pre>