FileStreamResult Class¶
Summary¶
Represents an [Microsoft.AspNet.Mvc.ActionResult]() that when executed will write a file from a stream to the response.
Constructors¶
-
FileStreamResult
(System.IO.Stream, MediaTypeHeaderValue)¶ Creates a new [Microsoft.AspNet.Mvc.FileStreamResult](Microsoft.AspNet.Mvc.FileStreamResult.yml) instance with the provided <paramref name=”fileStream” /> and the provided <paramref name=”contentType” />.
Arguments: - fileStream (System.IO.Stream) – The stream with the file.
- contentType (MediaTypeHeaderValue) – The Content-Type header of the response.
public FileStreamResult(Stream fileStream, MediaTypeHeaderValue contentType)
-
FileStreamResult
(System.IO.Stream, System.String) Creates a new [Microsoft.AspNet.Mvc.FileStreamResult](Microsoft.AspNet.Mvc.FileStreamResult.yml) instance with the provided <paramref name=”fileStream” /> and the provided <paramref name=”contentType” />.
Arguments: - fileStream (System.IO.Stream) – The stream with the file.
- contentType (System.String) – The Content-Type header of the response.
public FileStreamResult(Stream fileStream, string contentType)
-
Properties¶
-
FileStream
()¶ Gets or sets the stream with the file that will be sent back as the response.
Return type: System.IO.Stream public Stream FileStream { get; set; }
-