title: Download a file in an ajax request without running into a long querystring
body: <p>I have an asp.net MVC site and a controller action that looks like this:</p>
  
  <pre><code>  public ActionResult GeneratePPT(MyParams deckParams)
    {
        string template = Server.MapPath("/PPTTemplate.pptx");
        var results = _model.GeneratePPT(template);
        return File(results.Content, "application/vnd.ms-powerpoint", results.FileName);
    }
  </code></pre>
  
  <p><strong>The issue is</strong>: <code>MyParams</code> object is getting very large (lots of parameters) so I would like to change this from a querystring to an ajax post to avoid long querystring issue (as I'm hitting the limit for Internet Explorer of 2083 characters in the URL.</p>
  
  <p>the problem is that I don't see how I could return a file as part of a JsonResponse so I'm looking for recommendations on how I could both:</p>
  
  <ol>
  <li>Get around the Internet Explorer 2083 character limit in URL</li>
  <li>Have the ability to return a <em>PowerPoint</em> file</li>
  </ol>
  
  <p><strong>I had an idea</strong> of doing an ajax post to the server, having the server save a file and just return a <em>path</em> in a jsonResponse.  Then have the client hit the server again to get the file.  Does this make sense? Is there a more elegant way to do this in one step?</p>