Resuming a scan batch after a crash
If the mobile app closes unexpectedly during scanning — you swiped it away, the OS killed it under memory pressure, the phone restarted — every scan that was already saved is still on disk.
How to resume
- Reopen the app.
- On the Dashboard you'll see a **Resume scan batch — N pages
waiting to upload** banner right above the projects list.
- Tap it. You're back in the batch review screen with all the
thumbnails.
- Add more (goes back to the scanner and appends to the same
batch) or Upload to send them to the server.
What's protected
- Every completed scan is copied into durable storage
(Paths.document/pending-uploads/{batchId}/) before the app moves to the next page. Order matters: even if page N+1's processing crashes the app, pages 1..N are safe.
- The batch manifest is a JSON file on disk. It survives OS
memory reclamation, app force-quits, and reboots.
- Once you tap Upload, per-item status (
pending/uploaded/
failed) is written after every server round-trip. If the upload fails mid-batch, resuming skips the ones that already landed and only re-uploads the pending ones.
What isn't protected
If the app crashes inside the native scanner UI — before you tap Save in the scanner — those captures were held by the OS scanner Activity, not by us. They're gone.
Workaround: tap Save frequently on long sessions rather than scanning 100 pages in one shot. Each Save-Upload cycle checkpoints your work.
Automatic cleanup
Once every page in a batch is uploaded, the entire pending-uploads/{batchId}/ directory is deleted and the manifest row removed. Nothing hangs around on disk.