PageModel.PhysicalFile Methode

Definition

Überlädt

PhysicalFile(String, String)

Gibt die von physicalPath (Status200OK) angegebene Datei mit dem als Inhaltstyp angegebenen contentType zurück.

PhysicalFile(String, String, String)

Gibt die von physicalPath (Status200OK) angegebene Datei mit dem als Inhaltstyp und contentType dem fileDownloadName angegebenen als vorgeschlagenen Dateinamen zurück.

PhysicalFile(String, String)

Gibt die von physicalPath (Status200OK) angegebene Datei mit dem als Inhaltstyp angegebenen contentType zurück.

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

Parameter

physicalPath
String

Der physische Pfad der zurückzugebenden Datei.

contentType
String

Der Inhaltstyp der Datei.

Gibt zurück

Die für die Antwort erstellte PhysicalFileResult .

Gilt für:

PhysicalFile(String, String, String)

Gibt die von physicalPath (Status200OK) angegebene Datei mit dem als Inhaltstyp und contentType dem fileDownloadName angegebenen als vorgeschlagenen Dateinamen zurück.

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

Parameter

physicalPath
String

Der physische Pfad der zurückzugebenden Datei.

contentType
String

Der Inhaltstyp der Datei.

fileDownloadName
String

Der vorgeschlagene Dateiname.

Gibt zurück

Die für die Antwort erstellte PhysicalFileResult .

Gilt für: