TusOptions - thsdmfwns/tus-blazor-client GitHub Wiki
type : Uri
The upload creation URL which will be used to create new uploads.
type : long?
default value: null
A number indicating the maximum size of a PATCH request body in bytes. The default value null
means that tus-js-client will try to upload the entire file in one request. This setting is also required if the input file is a reader/readable stream.
type : Action<long, long>?
default value: null
An optional function that will be called each time progress information is available. The arguments will be bytesSent and bytesTotal.
-
Left parameter of long type
: BytesSent -
Right parameter of long type
: BytesTotal
type : Action<long, Long, long>?
default value: null
An optional function that will be called each time a PATCH has been successfully completed. The arguments will be chunkSize, bytesAccepted, bytesTotal.
-
Left parameter of long type
: ChunkSize -
Middle parameter of long type
: BytesAccepted -
Right parameter of long type
: BytesTotal
type : Action<TusError>?
default value: null
An optional function called once an error appears. The argument will be an Error instance with additional information about the involved requests.
-
TusError
: Error
type : Action<TusError, Long, bool>?
default value: null
An optional function called once an error appears and before retrying.
When no callback is specified, the retry behavior will be the default one:
any status codes of 409, 423 or any other than 4XX will be treated as a server error and the request will be retried automatically,
as long as the browser does not indicate that we are offline.
When a callback is specified, its return value will influence the retry behavior:
The function must return true if the request should be retried, false otherwise.
The argument will be an Error instance with additional information about the involved requests.
-
TusError
: Error -
Long
: RetryAttempt -
bool
: Return value
type : Dictionary<string, string>
default value: new Dictionary<string, string>()
An object with custom header values used in all requests. Useful for adding authentication details.
type : Dictionary<string, string>
default value: new Dictionary<string, string>()
An object with string values used as additional meta data which will be passed along to the server when (and only when) creating a new upload.
type : List<int>
default value: new List<int>() { 0, 1000, 3000, 5000 }
An array or empty, indicating how many milliseconds should pass before the next attempt to uploading will be started after the transfer has been interrupted.
type : bool
default value: true
A boolean indicating if the upload URL should be stored in the URL storage using the file's fingerprint after an new upload resource on the server has been created or an upload URL has been provided using the uploadUrl option.
If enabled, the upload URL can later be retrieved from the URL storage using the tus.Upload#findPreviousUploads method.
type : bool
default value: false
A boolean indicating if the fingerprint in the URL storage will be removed once the upload is successfully completed.
type : bool
default value: false
A boolean indicating whether a stream of data is going to be uploaded as a Reader. If so, the total size isn't available when we begin uploading, so we use the Tus Upload-Defer-Length header.
type : bool
default value: false
A boolean indicating whether the creation-with-upload extension should be used. If true, the file's content will already be transferred in the POST request when a new upload is created.
type : int
default value: 1
A number indicating how many parts should be uploaded in parallel. If this number is not 1, the input file will be split into multiple parts, where each part is uploaded individually in parallel.
type : List<(int start, int end)>?
default value: null
An array indicating the boundaries of the different parts uploaded during a parallel upload. This option is only considered if parallelUploads is greater than 1.
type : Action<TusHttpRequest>?
default value: null
An optional function that will be called before a HTTP request is sent out.
type : Action<TusHttpRequest?, TusHttpResponse?>?
default value: null
An optional function that will be called after a HTTP response has been received.