Class FileStreamResult
Represents a IFileResult that when executed will write a binary file to the response.
public class FileStreamResult : IFileStreamResult, IFileResult
- Inheritance
-
FileStreamResult
- Implements
- Inherited Members
Constructors
FileStreamResult(string, Stream, string?)
Initializes a new instance of the FileStreamResult class.
public FileStreamResult(string contentType, Stream fileStream, string? fileName = null)
Parameters
contentType
stringThe Content-Type header for the response.
fileStream
StreamThe stream with the file that will be sent back as the response..
fileName
stringThe file name.
Properties
ContentType
Gets the Content-Type header for the response.
public string ContentType { get; }
Property Value
FileName
Gets the file name.
public string? FileName { get; }
Property Value
FileStream
Gets the stream with the file that will be sent back as the response.
public Stream FileStream { get; }