Share via


SendFileResponseExtensions.SendFileAsync Method

Definition

Overloads

SendFileAsync(HttpResponse, IFileInfo, CancellationToken)

Sends the given file using the SendFile extension.

SendFileAsync(HttpResponse, String, CancellationToken)

Sends the given file using the SendFile extension.

SendFileAsync(HttpResponse, IFileInfo, Int64, Nullable<Int64>, CancellationToken)

Sends the given file using the SendFile extension.

SendFileAsync(HttpResponse, String, Int64, Nullable<Int64>, CancellationToken)

Sends the given file using the SendFile extension.

SendFileAsync(HttpResponse, IFileInfo, CancellationToken)

Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs

Sends the given file using the SendFile extension.

public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, Microsoft.Extensions.FileProviders.IFileInfo file, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * Microsoft.Extensions.FileProviders.IFileInfo * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, file As IFileInfo, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

response
HttpResponse
file
IFileInfo

The file.

cancellationToken
CancellationToken

The CancellationToken.

Returns

Applies to

SendFileAsync(HttpResponse, String, CancellationToken)

Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs

Sends the given file using the SendFile extension.

public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, string fileName, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, fileName As String, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

response
HttpResponse
fileName
String

The full path to the file.

cancellationToken
CancellationToken

The CancellationToken.

Returns

Applies to

SendFileAsync(HttpResponse, IFileInfo, Int64, Nullable<Int64>, CancellationToken)

Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs

Sends the given file using the SendFile extension.

public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, Microsoft.Extensions.FileProviders.IFileInfo file, long offset, long? count, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * Microsoft.Extensions.FileProviders.IFileInfo * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, file As IFileInfo, offset As Long, count As Nullable(Of Long), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

response
HttpResponse
file
IFileInfo

The file.

offset
Int64

The offset in the file.

count
Nullable<Int64>

The number of bytes to send, or null to send the remainder of the file.

cancellationToken
CancellationToken

Returns

Applies to

SendFileAsync(HttpResponse, String, Int64, Nullable<Int64>, CancellationToken)

Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs
Source:
SendFileResponseExtensions.cs

Sends the given file using the SendFile extension.

public static System.Threading.Tasks.Task SendFileAsync (this Microsoft.AspNetCore.Http.HttpResponse response, string fileName, long offset, long? count, System.Threading.CancellationToken cancellationToken = default);
static member SendFileAsync : Microsoft.AspNetCore.Http.HttpResponse * string * int64 * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SendFileAsync (response As HttpResponse, fileName As String, offset As Long, count As Nullable(Of Long), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

response
HttpResponse
fileName
String

The full path to the file.

offset
Int64

The offset in the file.

count
Nullable<Int64>

The number of bytes to send, or null to send the remainder of the file.

cancellationToken
CancellationToken

Returns

Applies to