PageBase.PhysicalFile 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
PhysicalFile(String, String, String) |
返回由 |
PhysicalFile(String, String) |
返回由 |
PhysicalFile(String, String, String)
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- 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)
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
返回由 physicalPath
(Status200OK) 指定的文件,并将 指定 contentType
为 Content-Type。
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 。