ControllerBase.PhysicalFile Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, String, Boolean) |
Retourne le fichier spécifié par |
PhysicalFile(String, String) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, String) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, Boolean) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) |
Retourne le fichier spécifié par |
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)
Retourne le fichier spécifié par physicalPath
(Status200OK), le spécifié contentType
comme type de contenu et le spécifié fileDownloadName
comme nom de fichier suggéré.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- fileDownloadName
- String
Nom de fichier suggéré.
- lastModified
- Nullable<DateTimeOffset>
de DateTimeOffset quand le fichier a été modifié pour la dernière fois.
- entityTag
- EntityTagHeaderValue
EntityTagHeaderValue associé au fichier.
- enableRangeProcessing
- Boolean
Définissez sur true
pour activer le traitement des demandes de plage.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)
Retourne le fichier spécifié par physicalPath
(Status200OK), le spécifié contentType
comme type de contenu et le spécifié fileDownloadName
comme nom de fichier suggéré.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- fileDownloadName
- String
Nom de fichier suggéré.
- lastModified
- Nullable<DateTimeOffset>
de DateTimeOffset quand le fichier a été modifié pour la dernière fois.
- entityTag
- EntityTagHeaderValue
EntityTagHeaderValue associé au fichier.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)
Retourne le fichier spécifié par physicalPath
(Status200OK), et le spécifié contentType
en tant que Type de contenu.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- lastModified
- Nullable<DateTimeOffset>
de DateTimeOffset quand le fichier a été modifié pour la dernière fois.
- entityTag
- EntityTagHeaderValue
EntityTagHeaderValue associé au fichier.
- enableRangeProcessing
- Boolean
Définissez sur true
pour activer le traitement des demandes de plage.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String, String, Boolean)
Retourne le fichier spécifié par physicalPath
(Status200OK) avec le spécifié contentType
comme type de contenu et le spécifié fileDownloadName
comme nom de fichier suggéré.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- fileDownloadName
- String
Nom de fichier suggéré.
- enableRangeProcessing
- Boolean
Définissez sur true
pour activer le traitement des demandes de plage.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String)
Retourne le fichier spécifié par physicalPath
(Status200OK) avec le spécifié contentType
comme Type de contenu.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String, String)
Retourne le fichier spécifié par physicalPath
(Status200OK) avec le spécifié contentType
comme type de contenu et le spécifié fileDownloadName
comme nom de fichier suggéré.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- fileDownloadName
- String
Nom de fichier suggéré.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String, Boolean)
Retourne le fichier spécifié par physicalPath
(Status200OK) avec le spécifié contentType
comme Type de contenu.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- enableRangeProcessing
- Boolean
Définissez sur true
pour activer le traitement des demandes de plage.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)
Retourne le fichier spécifié par physicalPath
(Status200OK), et le spécifié contentType
en tant que Type de contenu.
Cela prend en charge les requêtes de plage (Status206PartialContent ou Status416RangeNotSatisfiable si la plage n’est pas satisfaisante).
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
Paramètres
- physicalPath
- String
Chemin d'accès au fichier. Le chemin d’accès doit être un chemin absolu.
- contentType
- String
Type de contenu du fichier.
- lastModified
- Nullable<DateTimeOffset>
de DateTimeOffset quand le fichier a été modifié pour la dernière fois.
- entityTag
- EntityTagHeaderValue
EntityTagHeaderValue associé au fichier.
Retours
créé PhysicalFileResult pour la réponse.
- Attributs
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : tout au long de 2024, nous allons éliminer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d'informations, consultez :Envoyer et afficher des commentaires pour