Dev.to
7/20/2026

Ship a Restart-Safe Upload CLI That Survives an Expired Resume URL
Short summary
A resumable upload CLI must persist checkpoint identity (file fingerprint, upload ID, offset) rather than credentials like signed URLs, and reconcile local vs remote offsets on restart. The server offset wins because a crash can occur after bytes are accepted but before the local checkpoint updates. Checkpoints should use write-to-temp plus atomic rename, and users need inspectable, removable recovery state to avoid hidden lock-in.
- •Persist checkpoint identity not credentials; exchange durable upload ID for fresh authorization on restart
- •Server offset is authoritative—reconcile local checkpoint against it before resuming
- •Expose checkpoint state to users so recovery is inspectable and removable, not hidden lock-in
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



