I cannot find a reference to downloading a file using MVC Core.
We have a single exe file for members to download from our website. In the past we have put
<
I used this answer posted by @Tieson T to come up with this solution
public FileResult Download()
{
var fileName = $"{V9.Version}.exe";
var filepath = $"Downloads/{fileName}";
byte[] fileBytes = System.IO.File.ReadAllBytes(filepath);
return File(fileBytes, "application/x-msdownload", fileName);
}
The view is now
Download
@Ageonix was also correct about not requiring the ~ to get to wwwroot