Compartir a través de


TypedResults.Bytes Método

Definición

Sobrecargas

Bytes(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Escribe el contenido de la matriz de bytes en la respuesta.

Esto admite solicitudes de intervalo (Status206PartialContent o Status416RangeNotSatisfiable si el intervalo no es satisfiable).

Esta API es un alias para File(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue).

Bytes(ReadOnlyMemory<Byte>, String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Escribe el contenido de la matriz de bytes en la respuesta.

Esto admite solicitudes de intervalo (Status206PartialContent o Status416RangeNotSatisfiable si el intervalo no es satisfiable).

Bytes(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Source:
TypedResults.cs

Escribe el contenido de la matriz de bytes en la respuesta.

Esto admite solicitudes de intervalo (Status206PartialContent o Status416RangeNotSatisfiable si el intervalo no es satisfiable).

Esta API es un alias para File(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue).

public static Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult Bytes (byte[] contents, string? contentType = default, string? fileDownloadName = default, bool enableRangeProcessing = false, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default);
static member Bytes : byte[] * string * string * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult
Public Shared Function Bytes (contents As Byte(), Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional enableRangeProcessing As Boolean = false, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing) As FileContentHttpResult

Parámetros

contents
Byte[]

Contenido del archivo.

contentType
String

El tipo de contenido del archivo.

fileDownloadName
String

Nombre de archivo sugerido.

enableRangeProcessing
Boolean

Establézcalo en true para habilitar el procesamiento de solicitudes de intervalo.

lastModified
Nullable<DateTimeOffset>

DateTimeOffset de cuándo se modificó por última vez el archivo.

entityTag
EntityTagHeaderValue

Asociado EntityTagHeaderValue al archivo .

Devoluciones

creado FileContentHttpResult para la respuesta.

Se aplica a

Bytes(ReadOnlyMemory<Byte>, String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Source:
TypedResults.cs

Escribe el contenido de la matriz de bytes en la respuesta.

Esto admite solicitudes de intervalo (Status206PartialContent o Status416RangeNotSatisfiable si el intervalo no es satisfiable).

public static Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult Bytes (ReadOnlyMemory<byte> contents, string? contentType = default, string? fileDownloadName = default, bool enableRangeProcessing = false, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default);
static member Bytes : ReadOnlyMemory<byte> * string * string * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult
Public Shared Function Bytes (contents As ReadOnlyMemory(Of Byte), Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional enableRangeProcessing As Boolean = false, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing) As FileContentHttpResult

Parámetros

contents
ReadOnlyMemory<Byte>

Contenido del archivo.

contentType
String

El tipo de contenido del archivo.

fileDownloadName
String

Nombre de archivo sugerido.

enableRangeProcessing
Boolean

Establézcalo en true para habilitar el procesamiento de solicitudes de intervalo.

lastModified
Nullable<DateTimeOffset>

DateTimeOffset de cuándo se modificó por última vez el archivo.

entityTag
EntityTagHeaderValue

Asociado EntityTagHeaderValue al archivo .

Devoluciones

creado FileContentHttpResult para la respuesta.

Se aplica a