tusc library

Classes

Headers
TusBaseClient
A base client for the tus resumable upload protocol.
TusCache
Implementations of this interface are used to lookup a fingerprint with the corresponding url.
TusClient
A tus resumable upload client that reads data from an XFile.
TusMemoryCache
This class is used to cache upload url in memory and to resume upload later.
TusPersistentCache
This class is used to cache upload url in a persistent way to resume upload later.
TusStreamClient
A tus resumable upload client that reads data from a Stream.

Extensions

IntExtension on int
MapExtension on Map<K, V>

Typedefs

CompleteCallback = void Function(Response response)
Callback to listen when upload finishes
ErrorCallback = void Function(ProtocolException error)
Callback to listen when upload fails
ProgressCallback = void Function(int count, int total, Response? response)
Callback to listen the progress for sending data. count the length of the bytes that have been sent. total the content length.

Exceptions / Errors

ProtocolException
This exception is thrown if the server sends a request with an unexpected status code or missing/invalid headers.