I'm working on ASP.NET MVC and I want to force the download of plain text file instead of viewing it.
I was initially using this:
return File(download, "application/txt", "Result.txt");
And my colleague is telling me I should do this:
return File(download, System.Net.Mime.MediaTypeNames.Application.Octet, "Result.txt");
We got into some debate over advantages of each, but I still want to know which is the proper one. My computer issues download on both MIMEs on current Firefox & IE versions. IE doesn't show any difference, but Firefox has. File type when downloading application/txt
is TXT, but when downloading ...Application.Octet
file type is "Secure download manager" (what what?..)