6

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 the ".zip" extension.

fearofawhackplanet
  • 52,166
  • 53
  • 160
  • 253

1 Answers1

13

You could specify a download filename:

return File("test.zip", "application/zip", "test.zip");
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928