tusc
4.0.0, released 3 months ago by dev.lamt.dev
A pure Dart tus client for resumable file uploads.
WASM-ready
What it does
Allows pausing, canceling, and resuming file uploads using the tus protocol over HTTP. It supports both file-based and stream-based uploads with configurable chunk sizes, persistent caching, and progress tracking.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need resumable file uploads that can survive app restarts, crashes, or network drops.
- You are uploading large files where chunking and progress reporting are required.
Skip it when
- Your backend does not support the tus protocol.
- You only need simple, non-resumable HTTP file uploads.
Strengths
- Supports persistent caching to automatically resume uploads after app restarts.
- Pure Dart implementation with broad platform support including mobile, desktop, and web.
- Fine-grained progress reporting via sub-chunks.
Weaknesses
- Requires a server that specifically implements the tus protocol.
- Default fingerprint generation can break if the creation URL is one-time or pre-signed without custom overrides.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
Not documented
final file = XFile('/path/to/some/video.mp4');
final tusServerURL = 'https://master.tus.io/files';
final tusClient = initTusClient(file, tusServerURL);
handleClient(tusClient);Alternatives
Packages that do the same job and could replace tusc.
Works with
Packages commonly used together with tusc: ones it builds on, ones built on it, and its own family.
- cryptotusc depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- hive_cetusc depends on itA lightweight and fast NoSQL key-value database written in pure Dart.
- cross_filetusc depends on itAn abstraction to allow working with files across multiple platforms.
- cloudflareBuilt on tuscDart SDK and client for Cloudflare APIs including Images, Stream, Live Inputs, and R2 storage.