Class UploadOptions
The options of an upload in chunks (see UploadAsync<TResult>(InterpolatedApiPathHandler, UploadSource, ReadOnlySpan<(string Name, object? Value)>, object?, UploadOptions?, CancellationToken) and UploadStreamingAsync<TItem>(InterpolatedApiPathHandler, UploadSource, ReadOnlySpan<(string Name, object? Value)>, object?, UploadOptions?, CancellationToken)).
Namespace: Singulink.Net.Http.Api.Client
Assembly: Singulink.Net.Http.Api.Client.dll
Syntax
public sealed class UploadOptions
Properties
| Name | Description |
|---|---|
| ChunkSize | Gets the chunk size in bytes to ask the service for, which the service keeps within its bounds: by default 5 MiB to 64 MiB. Default is null, which uses the service's default, 5 MiB unless the service sets another. |
| ChunkTimeout | Gets how long the request of a chunk can go without sending any of the chunk's bytes, or, after the last of them, without its response. In the browser, which sends the content of a request at once, and on Android and iOS, whose HTTP handlers read the content of a request into memory before they send it, it is in effect how long the request can take, from sending it until its response, which a 5 MiB chunk takes at about 140 kbit/s with the default. InfiniteTimeSpan and values longer than MaxValue milliseconds mean no timeout. A chunk whose request times out is sent again. Default is 5 minutes. |
| CompletionIdleTimeout | Gets how long the completion of the upload can send nothing, not even a keep-alive ping, before its request is made again, which picks up the processing where it is. InfiniteTimeSpan and values longer than MaxValue milliseconds (about 24.8 days) mean no limit. Default is 60 seconds, six of the service's default ping intervals. |
| MaxConcurrency | Gets how many chunks can be sent at the same time, from 1 to 4. Default is 1. |
| Progress | Gets the progress that the upload reports to as it sends chunks, and when the upload is being completed. Default is null, which reports none. |
| RetryTimeout | Gets how long after the last request of the upload that succeeded the requests that fail for a reason that may not last are made again. Zero makes none of them again, and InfiniteTimeSpan makes them again without a limit. Default is 5 minutes. |
| TimeProvider | Gets the time provider that measures RetryTimeout, the waits before requests are made again, ChunkTimeout and CompletionIdleTimeout. Default is null, which uses System. |