ASP.NET MVC: Returning large amounts of data from FileResult

后端 未结 3 979
执念已碎
执念已碎 2021-01-12 08:09

I have a file browser application in MVC4 that allows you to download a selected file from a controller.

Currently, the FileResult returns the Stream of the file, al

3条回答
  •  既然无缘
    2021-01-12 08:42

    You can disable the response buffer before you return the file result.

    Response.BufferOutput = false;
    return File(fileStream, contentType);
    

提交回复
热议问题