FileResult FileResult FileResult FileResult Class


Represents an ActionResult that when executed will write a file as the response.

public ref class FileResult abstract : Microsoft::AspNetCore::Mvc::ActionResult
public abstract class FileResult : Microsoft.AspNetCore.Mvc.ActionResult
type FileResult = class
    inherit ActionResult
Public MustInherit Class FileResult
Inherits ActionResult


FileResult(String) FileResult(String) FileResult(String) FileResult(String)

Creates a new FileResult instance with the provided contentType.


ContentType ContentType ContentType ContentType

Gets the Content-Type header for the response.

EnableRangeProcessing EnableRangeProcessing EnableRangeProcessing EnableRangeProcessing

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

EntityTag EntityTag EntityTag EntityTag

Gets or sets the etag associated with the FileResult.

FileDownloadName FileDownloadName FileDownloadName FileDownloadName

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

LastModified LastModified LastModified LastModified

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


ExecuteResult(ActionContext) ExecuteResult(ActionContext) ExecuteResult(ActionContext) 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) ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext) 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.

(Inherited from ActionResult)

Applies to