How to return a file result when I don't know the content type
- by Jim Geurts
I have an asp.net mvc action that returns a file result. Behind the scenes, it's just returning a file from a directory. FilePathResult requires a content type, but I don't know that.
What is the proper way to return a file result if I only have the path to the file available?