次の方法で共有


PageModel.PhysicalFile メソッド

定義

オーバーロード

PhysicalFile(String, String)

() でphysicalPath指定され、 が Content-Type として指定されたファイルを返しますcontentTypeStatus200OK

PhysicalFile(String, String, String)

() でphysicalPath指定されたファイルを Content-Type として指定し、指定contentTypeした fileDownloadName を推奨されるファイル名として返Status200OKします。

PhysicalFile(String, String)

ソース:
PageModel.cs
ソース:
PageModel.cs

() でphysicalPath指定され、 が Content-Type として指定されたファイルを返しますcontentTypeStatus200OK

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

パラメーター

physicalPath
String

返されるファイルの物理パス。

contentType
String

ファイルの Content-Type。

戻り値

応答用に作成された PhysicalFileResult

適用対象

PhysicalFile(String, String, String)

ソース:
PageModel.cs
ソース:
PageModel.cs

() でphysicalPath指定されたファイルを Content-Type として指定し、指定contentTypeした fileDownloadName を推奨されるファイル名として返Status200OKします。

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

パラメーター

physicalPath
String

返されるファイルの物理パス。

contentType
String

ファイルの Content-Type。

fileDownloadName
String

推奨されるファイル名。

戻り値

応答用に作成された PhysicalFileResult

適用対象