ControllerBase.PhysicalFile Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) |
Returns the file specified by |
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) |
Returns the file specified by |
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) |
Returns the file specified by |
PhysicalFile(String, String, String, Boolean) |
Returns the file specified by |
PhysicalFile(String, String, Boolean) |
Returns the file specified by |
PhysicalFile(String, String, String) |
Returns the file specified by |
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) |
Returns the file specified by |
PhysicalFile(String, String) |
Returns the file specified by |
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK), the
specified contentType
as the Content-Type, and the specified fileDownloadName
as the suggested file name.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, System::String ^ fileDownloadName, Nullable<DateTimeOffset> lastModified, Microsoft::Net::Http::Headers::EntityTagHeaderValue ^ entityTag, bool enableRangeProcessing);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string fileDownloadName, DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PhysicalFile : string * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, fileDownloadName As String, lastModified As Nullable(Of DateTimeOffset), entityTag As EntityTagHeaderValue, enableRangeProcessing As Boolean) As PhysicalFileResult
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- fileDownloadName
- String
The suggested file name.
- lastModified
- Nullable<DateTimeOffset>
The DateTimeOffset of when the file was last modified.
- entityTag
- EntityTagHeaderValue
The EntityTagHeaderValue associated with the file.
- enableRangeProcessing
- Boolean
Set to true
to enable range requests processing.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK), the
specified contentType
as the Content-Type, and the specified fileDownloadName
as the suggested file name.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, System::String ^ fileDownloadName, Nullable<DateTimeOffset> lastModified, Microsoft::Net::Http::Headers::EntityTagHeaderValue ^ entityTag);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string fileDownloadName, DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PhysicalFile : string * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, fileDownloadName As String, lastModified As Nullable(Of DateTimeOffset), entityTag As EntityTagHeaderValue) As PhysicalFileResult
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- fileDownloadName
- String
The suggested file name.
- lastModified
- Nullable<DateTimeOffset>
The DateTimeOffset of when the file was last modified.
- entityTag
- EntityTagHeaderValue
The EntityTagHeaderValue associated with the file.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK), and
the specified contentType
as the Content-Type.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, Nullable<DateTimeOffset> lastModified, Microsoft::Net::Http::Headers::EntityTagHeaderValue ^ entityTag, bool enableRangeProcessing);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PhysicalFile : string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, lastModified As Nullable(Of DateTimeOffset), entityTag As EntityTagHeaderValue, enableRangeProcessing As Boolean) As PhysicalFileResult
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- lastModified
- Nullable<DateTimeOffset>
The DateTimeOffset of when the file was last modified.
- entityTag
- EntityTagHeaderValue
The EntityTagHeaderValue associated with the file.
- enableRangeProcessing
- Boolean
Set to true
to enable range requests processing.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String, String, Boolean)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK) with the
specified contentType
as the Content-Type and the
specified fileDownloadName
as the suggested file name.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, System::String ^ fileDownloadName, bool enableRangeProcessing);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string fileDownloadName, bool enableRangeProcessing);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string? fileDownloadName, bool enableRangeProcessing);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PhysicalFile : string * string * string * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * string * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, fileDownloadName As String, enableRangeProcessing As Boolean) As PhysicalFileResult
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- fileDownloadName
- String
The suggested file name.
- enableRangeProcessing
- Boolean
Set to true
to enable range requests processing.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String, Boolean)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK) with the
specified contentType
as the Content-Type.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, bool enableRangeProcessing);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, bool enableRangeProcessing);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PhysicalFile : string * string * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * bool -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, enableRangeProcessing As Boolean) As PhysicalFileResult
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- enableRangeProcessing
- Boolean
Set to true
to enable range requests processing.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String, String)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK) with the
specified contentType
as the Content-Type and the
specified fileDownloadName
as the suggested file name.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, System::String ^ fileDownloadName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string fileDownloadName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, string? fileDownloadName);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- fileDownloadName
- String
The suggested file name.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK), and
the specified contentType
as the Content-Type.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType, Nullable<DateTimeOffset> lastModified, Microsoft::Net::Http::Headers::EntityTagHeaderValue ^ entityTag);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType, DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member PhysicalFile : string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
override this.PhysicalFile : string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Mvc.PhysicalFileResult
Public Overridable Function PhysicalFile (physicalPath As String, contentType As String, lastModified As Nullable(Of DateTimeOffset), entityTag As EntityTagHeaderValue) As PhysicalFileResult
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
- lastModified
- Nullable<DateTimeOffset>
The DateTimeOffset of when the file was last modified.
- entityTag
- EntityTagHeaderValue
The EntityTagHeaderValue associated with the file.
Returns
The created PhysicalFileResult for the response.
- Attributes
Applies to
PhysicalFile(String, String)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Returns the file specified by physicalPath
(Status200OK) with the
specified contentType
as the Content-Type.
This supports range requests (Status206PartialContent or
Status416RangeNotSatisfiable if the range is not satisfiable).
public:
virtual Microsoft::AspNetCore::Mvc::PhysicalFileResult ^ PhysicalFile(System::String ^ physicalPath, System::String ^ contentType);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile (string physicalPath, string contentType);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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
Parameters
- physicalPath
- String
The path to the file. The path must be an absolute path.
- contentType
- String
The Content-Type of the file.
Returns
The created PhysicalFileResult for the response.
- Attributes