I have the controller code below:
public FileResult DownloadFileParaView()
{
byte[] fileBytes = System.IO.File.ReadAllBytes(@"MyPath");
string fileName = "MyFileName";
return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, fileName);
}
How can I call it from JavaScript to return my file? Does I have to copy the file to project content?