Op Englesch liesen

Deelen iwwer


PageModel.PhysicalFile Method

Definition

Overloads

PhysicalFile(String, String)

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

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)

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.cs

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

C#
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType);

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

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

PhysicalFile(String, String, String)

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.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.

C#
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string fileDownloadName);
C#
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string? fileDownloadName);

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

ASP.NET Core 9.0 an aner Versiounen
Produkt Versiounen
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0