title: Large files download issue on Google Chrome
body: <p>This issue is driving me crazy.</p>
  
  <p>I want to export a pdf report generated by iTextSharp.</p>
  
  <p>I have an ASP.NET Web API project where I have my code that generates the PDF file.</p>
  
  <p>I'm calling the API using jQuery using post method to send some parameters, get the query result based on those filters and export them.</p>
  
  <p>Everything works fine on both IE and FireFox. The issue is related to Google Chrome when it comes to files larger than 5MB. The process finishes but I get "Download failed - Network error" from chrome.</p>
  
  <p>The problem seems to be much more related to the javascript part as the byte array returns correctly.</p>
  
  <p>Any help regarding this please ?</p>
  
  <p>My ASP.NET Web Api method code : </p>
  
  <pre><code>[HttpPost]
  public byte[] ExportPDFRequestsList(RequestFilter filter)
  {
      //Method contains the logic of export that has no issues
      return RequestsService.ExportPDFRequestsList(filter);
  }
  </code></pre>
  
  <p>My javascript code to download the file : </p>
  
  <pre><code>$.when(
          //jQuery ajax post method -- works fine
          AppObj.JsonCall("Post", exportPDFRequestsListUrl, true, parameter)
  
      ).then(function (response) {
          var newdata = "data:application/pdf;base64," + escape(response);
          var a = document.createElement("a");
          //build download link:
          a.href = newdata;
          a.setAttribute("download", "Requests.pdf");
          document.body.appendChild(a);
          setTimeout(function () {
  
              var e = document.createEvent("MouseEvents");
  
              e.initMouseEvent("click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null
            );
              a.dispatchEvent(e);
              document.body.removeChild(a);
  
          }, 999);
  
      });
  </code></pre>