ControllerBase.PhysicalFile Método

Definição

Sobrecargas

PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK), o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Retorna o arquivo especificado por physicalPath (Status200OK), o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK) e o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, String, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, String)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Retorna o arquivo especificado por physicalPath (Status200OK) e o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK), o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

fileDownloadName
String

O nome do arquivo sugerido.

lastModified
Nullable<DateTimeOffset>

O DateTimeOffset de quando o arquivo foi modificado pela última vez.

entityTag
EntityTagHeaderValue

O EntityTagHeaderValue associado ao arquivo.

enableRangeProcessing
Boolean

Defina como true para habilitar o processamento de solicitações de intervalo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Retorna o arquivo especificado por physicalPath (Status200OK), o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

fileDownloadName
String

O nome do arquivo sugerido.

lastModified
Nullable<DateTimeOffset>

O DateTimeOffset de quando o arquivo foi modificado pela última vez.

entityTag
EntityTagHeaderValue

O EntityTagHeaderValue associado ao arquivo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK) e o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

lastModified
Nullable<DateTimeOffset>

O DateTimeOffset de quando o arquivo foi modificado pela última vez.

entityTag
EntityTagHeaderValue

O EntityTagHeaderValue associado ao arquivo.

enableRangeProcessing
Boolean

Defina como true para habilitar o processamento de solicitações de intervalo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String, String, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

fileDownloadName
String

O nome do arquivo sugerido.

enableRangeProcessing
Boolean

Defina como true para habilitar o processamento de solicitações de intervalo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String, String)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como o Tipo de Conteúdo e o especificado fileDownloadName como o nome de arquivo sugerido. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

fileDownloadName
String

O nome do arquivo sugerido.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String, Boolean)

Retorna o arquivo especificado por physicalPath (Status200OK) com o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

enableRangeProcessing
Boolean

Defina como true para habilitar o processamento de solicitações de intervalo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a

PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Retorna o arquivo especificado por physicalPath (Status200OK) e o especificado contentType como Tipo de Conteúdo. Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

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

Parâmetros

physicalPath
String

O caminho para o arquivo. O caminho deve ser um caminho absoluto.

contentType
String

O Tipo de Conteúdo do arquivo.

lastModified
Nullable<DateTimeOffset>

O DateTimeOffset de quando o arquivo foi modificado pela última vez.

entityTag
EntityTagHeaderValue

O EntityTagHeaderValue associado ao arquivo.

Retornos

O criado PhysicalFileResult para a resposta.

Atributos

Aplica-se a