Downloading stream using FileStreamResult
- by user1400915
I have a Action in controller as
public ActionResult Download()
{
return File(downloadStream, "application/octet-stream", fileName);
}
If I want to use FilePathresult as:
public FilePathResult Download()
{
return File(downloadStream, "application/octet-stream", fileName);
}
can I call the Download() on click of a button like this
@Html.ActionLink("FileDownload", "Download", new { file = item.FileName, GuID = item.DocumentGuID }) /text).Width(10);