Share via


PhysicalFileResult Constructors

Definition

Overloads

PhysicalFileResult(String, MediaTypeHeaderValue)

Creates a new PhysicalFileResult instance with the provided fileName and the provided contentType.

PhysicalFileResult(String, String)

Creates a new PhysicalFileResult instance with the provided fileName and the provided contentType.

PhysicalFileResult(String, MediaTypeHeaderValue)

Source:
PhysicalFileResult.cs
Source:
PhysicalFileResult.cs
Source:
PhysicalFileResult.cs

Creates a new PhysicalFileResult instance with the provided fileName and the provided contentType.

public:
 PhysicalFileResult(System::String ^ fileName, Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ contentType);
public PhysicalFileResult (string fileName, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType);
new Microsoft.AspNetCore.Mvc.PhysicalFileResult : string * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Sub New (fileName As String, contentType As MediaTypeHeaderValue)

Parameters

fileName
String

The path to the file. The path must be an absolute path.

contentType
MediaTypeHeaderValue

The Content-Type header of the response.

Applies to

PhysicalFileResult(String, String)

Source:
PhysicalFileResult.cs
Source:
PhysicalFileResult.cs
Source:
PhysicalFileResult.cs

Creates a new PhysicalFileResult instance with the provided fileName and the provided contentType.

public:
 PhysicalFileResult(System::String ^ fileName, System::String ^ contentType);
public PhysicalFileResult (string fileName, string contentType);
new Microsoft.AspNetCore.Mvc.PhysicalFileResult : string * string -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Sub New (fileName As String, contentType As String)

Parameters

fileName
String

The path to the file. The path must be an absolute path.

contentType
String

The Content-Type header of the response.

Applies to