ControllerBase.PhysicalFile Metodo

Definizione

Overload

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

Restituisce il file specificato da physicalPath (Status200OK), l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Restituisce il file specificato da physicalPath (Status200OK), l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Restituisce il file specificato da physicalPath (Status200OK) e l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

PhysicalFile(String, String, String, Boolean)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

PhysicalFile(String, String)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

PhysicalFile(String, String, String)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

PhysicalFile(String, String, Boolean)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Restituisce il file specificato da physicalPath (Status200OK) e l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Restituisce il file specificato da physicalPath (Status200OK), l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

fileDownloadName
String

Nome file suggerito.

lastModified
Nullable<DateTimeOffset>

Oggetto DateTimeOffset di quando il file è stato modificato per l'ultima volta.

entityTag
EntityTagHeaderValue

Oggetto EntityTagHeaderValue associato al file.

enableRangeProcessing
Boolean

Impostare su per true abilitare l'elaborazione delle richieste di intervallo.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

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

Restituisce il file specificato da physicalPath (Status200OK), l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

fileDownloadName
String

Nome file suggerito.

lastModified
Nullable<DateTimeOffset>

Oggetto DateTimeOffset di quando il file è stato modificato per l'ultima volta.

entityTag
EntityTagHeaderValue

Oggetto EntityTagHeaderValue associato al file.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

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

Restituisce il file specificato da physicalPath (Status200OK) e l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

lastModified
Nullable<DateTimeOffset>

Oggetto DateTimeOffset di quando il file è stato modificato per l'ultima volta.

entityTag
EntityTagHeaderValue

Oggetto EntityTagHeaderValue associato al file.

enableRangeProcessing
Boolean

Impostare su per true abilitare l'elaborazione delle richieste di intervallo.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

PhysicalFile(String, String, String, Boolean)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

fileDownloadName
String

Nome file suggerito.

enableRangeProcessing
Boolean

Impostare su per true abilitare l'elaborazione delle richieste di intervallo.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

PhysicalFile(String, String)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

PhysicalFile(String, String, String)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato come Content-Type e l'oggetto specificato contentTypefileDownloadName come nome file suggerito. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

fileDownloadName
String

Nome file suggerito.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

PhysicalFile(String, String, Boolean)

Restituisce il file specificato da physicalPath (Status200OK) con l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

enableRangeProcessing
Boolean

Impostare su per true abilitare l'elaborazione delle richieste di intervallo.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a

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

Restituisce il file specificato da physicalPath (Status200OK) e l'oggetto specificato contentType come Content-Type. Supporta le richieste di intervallo (Status206PartialContent o Status416RangeNotSatisfiable se l'intervallo non è soddisfabile).

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

Parametri

physicalPath
String

Percorso del file. Il percorso deve essere un percorso assoluto.

contentType
String

Tipo di contenuto del file.

lastModified
Nullable<DateTimeOffset>

Oggetto DateTimeOffset di quando il file è stato modificato per l'ultima volta.

entityTag
EntityTagHeaderValue

Oggetto EntityTagHeaderValue associato al file.

Restituisce

Oggetto creato PhysicalFileResult per la risposta.

Attributi

Si applica a