FileContentResult Class¶
Summary¶
Represents an [Microsoft.AspNet.Mvc.ActionResult]() that when executed will write a binary file to the response.
Constructors¶
-
FileContentResult
(System.Byte[], MediaTypeHeaderValue)¶ Creates a new [Microsoft.AspNet.Mvc.FileContentResult](Microsoft.AspNet.Mvc.FileContentResult.yml) instance with the provided <paramref name=”fileContents” /> and the provided <paramref name=”contentType” />.
Arguments: - fileContents (System.Byte[]) – The bytes that represent the file contents.
- contentType (MediaTypeHeaderValue) – The Content-Type header of the response.
public FileContentResult(byte[] fileContents, MediaTypeHeaderValue contentType)
-
FileContentResult
(System.Byte[], System.String) Creates a new [Microsoft.AspNet.Mvc.FileContentResult](Microsoft.AspNet.Mvc.FileContentResult.yml) instance with the provided <paramref name=”fileContents” /> and the provided <paramref name=”contentType” />.
Arguments: - fileContents (System.Byte[]) – The bytes that represent the file contents.
- contentType (System.String) – The Content-Type header of the response.
public FileContentResult(byte[] fileContents, string contentType)
-
Properties¶
-
FileContents
()¶ Gets or sets the file contents.
Return type: System.Byte[] public byte[] FileContents { get; set; }
-