FileResult Class

Definition

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
Inheritance
FileResult
Derived

Constructors

FileResult(String)

Creates a new FileResult instance with the provided contentType.

Properties

ContentType

Gets the Content-Type header for the response.

EnableRangeProcessing

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

EntityTag

Gets or sets the etag associated with the FileResult.

FileDownloadName

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

LastModified

Gets or sets the last modified information associated with the 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.

(Inherited from ActionResult)

Applies to