Share via


FileStreamResult Class

Definition

Represents an ActionResult that when executed will write a file from a stream to the response.

public ref class FileStreamResult : Microsoft::AspNetCore::Mvc::FileResult
public class FileStreamResult : Microsoft.AspNetCore.Mvc.FileResult
type FileStreamResult = class
    inherit FileResult
Public Class FileStreamResult
Inherits FileResult
Inheritance
FileStreamResult

Constructors

FileStreamResult(Stream, MediaTypeHeaderValue)

Creates a new FileStreamResult instance with the provided fileStream and the provided contentType.

FileStreamResult(Stream, String)

Creates a new FileStreamResult instance with the provided fileStream and the provided contentType.

Properties

ContentType

Gets the Content-Type header for the response.

(Inherited from FileResult)
EnableRangeProcessing

Gets or sets the value that enables range processing for the FileResult.

(Inherited from FileResult)
EntityTag

Gets or sets the etag associated with the FileResult.

(Inherited from FileResult)
FileDownloadName

Gets the file name that will be used in the Content-Disposition header of the response.

(Inherited from FileResult)
FileStream

Gets or sets the stream with the file that will be sent back as the response.

LastModified

Gets or sets the last modified information associated with the FileResult.

(Inherited from FileResult)

Methods

ExecuteResult(ActionContext)

Executes the result operation of the action method synchronously. This method is called by MVC to process the result of an action method.

(Inherited from ActionResult)
ExecuteResultAsync(ActionContext)

Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method. The default implementation of this method calls the ExecuteResult(ActionContext) method and returns a completed task.

Applies to