FileResult
is an abstract base class for all the others.
FileContentResult
- you use it when you have a byte array you would like to return as a file
FilePathResult
- when you have a file on disk and would like to return its content (you give a path)
FileStreamResult
- you have a stream open, you want to return its content as a file
However, you'll rarely have to use these classes - you can just use one of Controller.File
overloads and let ASP.NET MVC do the magic for you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…