Skip to content

Resume cache and linkable-aware duplicate handling for upload_files - #615

Open
Caushi wants to merge 1 commit into
mainfrom
feature/upload-files-resume-and-linkable
Open

Resume cache and linkable-aware duplicate handling for upload_files#615
Caushi wants to merge 1 commit into
mainfrom
feature/upload-files-resume-and-linkable

Conversation

@Caushi

@Caushi Caushi commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator
  • Add a resume_cache path to upload_files, keeping each file's tus URL keyed by MD5 so an interrupted transfer resumes instead of restarting from byte 0. None (the default) keeps no state and never resumes.
  • Change on_duplicate="link" to link only to a duplicate the server reports as linkable; one whose resource is still pending or failed is uploaded instead, so a retry after a failed transfer no longer fails until B-Fabric's orphan cleanup runs (~2 days).
  • Add linkable and existingResourceStatus to DuplicateResult. Breaking: on_duplicate="link" now requires a B-Fabric that reports linkable; a response omitting it is refused rather than guessed.
  • Raise WorkunitCompletionError when every transfer succeeded but marking the workunit available failed, carrying the UploadSummary so a caller can retry only the status flip instead of creating a second workunit.

@Caushi
Caushi requested a review from leoschwarz August 20, 2026 15:15
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