SendFileResponseExtensions.SendFileAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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)
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)
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.
- cancellationToken
- CancellationToken
Returns
Applies to
SendFileAsync(HttpResponse, String, Int64, Nullable<Int64>, CancellationToken)
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.
- cancellationToken
- CancellationToken