How to return a file result when I don't know the content type
Posted
by Jim Geurts
on Stack Overflow
See other posts from Stack Overflow
or by Jim Geurts
Published on 2010-03-30T04:09:43Z
Indexed on
2010/03/30
4:13 UTC
Read the original article
Hit count: 345
asp.net-mvc
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?
© Stack Overflow or respective owner