ASP.NET MVC returning zipped file with FileResult is missing extension
I have a zipped file which I am trying to stream to client:
public FileResult GetFiles()
{
return File("test.zip", "application/zip");
}
The file downloads but without t开发者_Go百科he ".zip" extension.
You could specify a download filename:
return File("test.zip", "application/zip", "test.zip");
精彩评论