Class FileContentResult
Represents a IFileResult that when executed will write a binary file to the response.
public class FileContentResult : IFileContentResult, IFileResult
- Inheritance
-
FileContentResult
- Implements
- Inherited Members
Constructors
FileContentResult(string, byte[], string?)
Initializes a new instance of the FileContentResult class.
public FileContentResult(string contentType, byte[] fileContents, string? fileName = null)
Parameters
contentType
stringThe Content-Type header for the response.
fileContents
byte[]The file contents.
fileName
stringThe file name.
Properties
ContentType
Gets the Content-Type header for the response.
public string ContentType { get; }
Property Value
FileContents
Gets the file contents.
public byte[] FileContents { get; }
Property Value
- byte[]
FileName
Gets the file name.
public string? FileName { get; }