PageBase.PhysicalFile 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
PhysicalFile(String, String, String) |
|
PhysicalFile(String, String) |
傳回指定為 Content-Type 的 (Status200OK) 所 |
PhysicalFile(String, String, String)
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
physicalPath
傳回 (指定的檔案 Status200OK ,) 指定 contentType
為 Content-Type,並將 指定 fileDownloadName
為建議的檔案名。
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 的 。
適用於
PhysicalFile(String, String)
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
- 來源:
- PageBase.cs
傳回指定為 Content-Type 的 (Status200OK) 所 physicalPath
指定的 contentType
檔案。
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 的 。