PageModel.File Methode

Definition

Überlädt

File(String, String, String)

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

File(Stream, String, String)

Gibt eine Datei im angegebenen fileStream (Status200OK) mit dem als Inhaltstyp und dem angegebenen fileDownloadName als vorgeschlagenen Dateinamen zurückcontentType.

File(Byte[], String, String)

Gibt eine Datei mit dem angegebenen fileContents Inhalt (Status200OK), dem angegebenen contentType als Inhaltstyp und dem angegebenen fileDownloadName als vorgeschlagenen Dateinamen zurück.

File(Stream, String)

Gibt eine Datei im angegebenen fileStream (Status200OK) mit dem als Inhaltstyp angegebenen contentType zurück.

File(Byte[], String)

Gibt eine Datei mit dem angegebenen fileContents Inhalt (Status200OK) und dem als Inhaltstyp angegebenen contentType zurück.

File(String, String)

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

File(String, String, String)

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

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

Parameter

virtualPath
String

Der virtuelle 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 VirtualFileResult .

Gilt für:

File(Stream, String, String)

Gibt eine Datei im angegebenen fileStream (Status200OK) mit dem als Inhaltstyp und dem angegebenen fileDownloadName als vorgeschlagenen Dateinamen zurückcontentType.

public:
 virtual Microsoft::AspNetCore::Mvc::FileStreamResult ^ File(System::IO::Stream ^ fileStream, System::String ^ contentType, System::String ^ fileDownloadName);
public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File (System.IO.Stream fileStream, string contentType, string fileDownloadName);
public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File (System.IO.Stream fileStream, string contentType, string? fileDownloadName);
abstract member File : System.IO.Stream * string * string -> Microsoft.AspNetCore.Mvc.FileStreamResult
override this.File : System.IO.Stream * string * string -> Microsoft.AspNetCore.Mvc.FileStreamResult
Public Overridable Function File (fileStream As Stream, contentType As String, fileDownloadName As String) As FileStreamResult

Parameter

fileStream
Stream

Der Stream mit dem Inhalt der Datei.

contentType
String

Der Inhaltstyp der Datei.

fileDownloadName
String

Der vorgeschlagene Dateiname.

Gibt zurück

Die für die Antwort erstellte FileStreamResult .

Gilt für:

File(Byte[], String, String)

Gibt eine Datei mit dem angegebenen fileContents Inhalt (Status200OK), dem angegebenen contentType als Inhaltstyp und dem angegebenen fileDownloadName als vorgeschlagenen Dateinamen zurück.

public:
 virtual Microsoft::AspNetCore::Mvc::FileContentResult ^ File(cli::array <System::Byte> ^ fileContents, System::String ^ contentType, System::String ^ fileDownloadName);
public virtual Microsoft.AspNetCore.Mvc.FileContentResult File (byte[] fileContents, string contentType, string fileDownloadName);
public virtual Microsoft.AspNetCore.Mvc.FileContentResult File (byte[] fileContents, string contentType, string? fileDownloadName);
abstract member File : byte[] * string * string -> Microsoft.AspNetCore.Mvc.FileContentResult
override this.File : byte[] * string * string -> Microsoft.AspNetCore.Mvc.FileContentResult
Public Overridable Function File (fileContents As Byte(), contentType As String, fileDownloadName As String) As FileContentResult

Parameter

fileContents
Byte[]

Der Inhalt der Datei.

contentType
String

Der Inhaltstyp der Datei.

fileDownloadName
String

Der vorgeschlagene Dateiname.

Gibt zurück

Die für die Antwort erstellte FileContentResult .

Gilt für:

File(Stream, String)

Gibt eine Datei im angegebenen fileStream (Status200OK) mit dem als Inhaltstyp angegebenen contentType zurück.

public:
 virtual Microsoft::AspNetCore::Mvc::FileStreamResult ^ File(System::IO::Stream ^ fileStream, System::String ^ contentType);
public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File (System.IO.Stream fileStream, string contentType);
abstract member File : System.IO.Stream * string -> Microsoft.AspNetCore.Mvc.FileStreamResult
override this.File : System.IO.Stream * string -> Microsoft.AspNetCore.Mvc.FileStreamResult
Public Overridable Function File (fileStream As Stream, contentType As String) As FileStreamResult

Parameter

fileStream
Stream

Der Stream mit dem Inhalt der Datei.

contentType
String

Der Inhaltstyp der Datei.

Gibt zurück

Die für die Antwort erstellte FileStreamResult .

Gilt für:

File(Byte[], String)

Gibt eine Datei mit dem angegebenen fileContents Inhalt (Status200OK) und dem als Inhaltstyp angegebenen contentType zurück.

public:
 virtual Microsoft::AspNetCore::Mvc::FileContentResult ^ File(cli::array <System::Byte> ^ fileContents, System::String ^ contentType);
public virtual Microsoft.AspNetCore.Mvc.FileContentResult File (byte[] fileContents, string contentType);
abstract member File : byte[] * string -> Microsoft.AspNetCore.Mvc.FileContentResult
override this.File : byte[] * string -> Microsoft.AspNetCore.Mvc.FileContentResult
Public Overridable Function File (fileContents As Byte(), contentType As String) As FileContentResult

Parameter

fileContents
Byte[]

Der Inhalt der Datei.

contentType
String

Der Inhaltstyp der Datei.

Gibt zurück

Die für die Antwort erstellte FileContentResult .

Gilt für:

File(String, String)

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

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

Parameter

virtualPath
String

Der virtuelle Pfad der zurückzugebenden Datei.

contentType
String

Der Inhaltstyp der Datei.

Gibt zurück

Die für die Antwort erstellte VirtualFileResult .

Gilt für: