Skip to content

Add resume support for incomplete downloads#9

Open
dannyd40 wants to merge 2 commits intoromandev-codex:mainfrom
dannyd40:feature/resume-incomplete-downloads
Open

Add resume support for incomplete downloads#9
dannyd40 wants to merge 2 commits intoromandev-codex:mainfrom
dannyd40:feature/resume-incomplete-downloads

Conversation

@dannyd40
Copy link
Copy Markdown

Summary

  • Incomplete downloads can now be resumed instead of re-downloaded from scratch
  • Button shows "⚠ Resume" (orange) when a local file is smaller than the remote file
  • Clicking "Resume" downloads only the remaining bytes using HTTP Range requests
  • Supports both multi-connection and single-connection resume depending on remaining size
  • Backend accepts a new resume parameter in the /server_download/start endpoint

How it works

  1. When a file exists locally, the frontend compares local vs remote size
  2. If incomplete, the button becomes "⚠ Resume" instead of "✓ Downloaded"
  3. On click, sends resume: true to the backend
  4. Backend reads the existing file size and passes resume_from to the download function
  5. Download function skips already-downloaded bytes and fetches only the remainder

Test plan

  • Partially download a large model, then click "Resume" → should continue from where it stopped
  • Fully downloaded model → should show "✓ Downloaded" (no resume button)
  • Resume with server that supports Range requests → multi-connection resume
  • Progress bar starts from the existing percentage, not 0%

🤖 Generated with Claude Code

dannyd40 and others added 2 commits March 15, 2026 12:13
When a file exists locally, compare its size against the remote size
to detect incomplete downloads. Shows "Incomplete" with orange button
and size details (e.g. 3.21 GB / 6.46 GB) when the local file is
smaller than expected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of re-downloading entirely, incomplete files can now be
resumed from where they left off using HTTP Range requests. The
download button shows "Resume" (orange) for incomplete files, and
clicking it downloads only the remaining bytes using multi-connection
or single-connection mode depending on the remaining size.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant