Dela via


PageBase.PhysicalFile Method

Definition

Overloads

PhysicalFile(String, String, String)

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name.

PhysicalFile(String, String)

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type.

PhysicalFile(String, String, String)

Source:
PageBase.cs
Source:
PageBase.cs
Source:
PageBase.cs

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name.

public:
 virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, System::String ^ fileDownloadName);
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string fileDownloadName);
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string? fileDownloadName);
abstract member PhysicalFile : string * string * string -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * string -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, fileDownloadName As String) As PhysicalFileResult

Parameters

physicalPath
String

The physical path of the file to be returned.

contentType
String

The Content-Type of the file.

fileDownloadName
String

The suggested file name.

Returns

The created PhysicalFileResult for the response.

Applies to

PhysicalFile(String, String)

Source:
PageBase.cs
Source:
PageBase.cs
Source:
PageBase.cs

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type.

public:
 virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType);
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType);
abstract member PhysicalFile : string * string -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String) As PhysicalFileResult

Parameters

physicalPath
String

The physical path of the file to be returned.

contentType
String

The Content-Type of the file.

Returns

The created PhysicalFileResult for the response.

Applies to