download csv file from web api in angular js

前端 未结 10 1763
[愿得一人]
[愿得一人] 2020-11-28 03:23

my API controller is returning a csv file as seen below:

    [HttpPost]
    public HttpResponseMessage GenerateCSV(FieldParameters fieldParams)
    {
                


        
10条回答
  •  死守一世寂寞
    2020-11-28 04:15

    The last answer worked for me for a few months, then stopped recognizing the filename, as adeneo commented ...

    @Scott's answer here is working for me:

    Download file from an ASP.NET Web API method using AngularJS

提交回复
热议问题