feat(upload): add multipart upload support for large files up to 5GB#107
Merged
feat(upload): add multipart upload support for large files up to 5GB#107
Conversation
Implements chunked multipart uploads using Cloudflare R2's multipart API, enabling uploads of files up to 5GB with progress tracking and resume support. Server-side changes: - Add multipart upload endpoints: /upload/init, /upload/:id/part/:n, /upload/:id/complete, /upload/:id/abort, /upload/:id/status - Add UPLOAD_SESSIONS KV namespace for session state management - Stream request body directly to R2 to avoid memory buffering - Support both regular and encrypted upload paths (/e/upload/*) CLI changes: - Auto-detect large files (>50MB) and use multipart upload - Add progress bar with speed and ETA display - Add resume support for interrupted uploads (--resume) - Add --chunk-size option for custom chunk sizes (default: 10MB) - Add --list-uploads to view interrupted uploads - Add --abort-upload to cancel and cleanup failed uploads - Add --no-progress to disable progress display New modules: - cli/largeFileUpload.ts: Core multipart upload logic with parallel chunks - cli/progressDisplay.ts: Progress bar and formatting utilities - cli/resumeState.ts: Resume state persistence to ~/.dedpaste/uploads/ Type definitions: - Add UploadSession, ResumeState, UploadProgress interfaces - Add MultipartInitRequest/Response, PartUploadResponse types - Add EncryptedFileHeader for future streaming encryption (v4) - Add LARGE_FILE_CONSTANTS configuration object Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
github-actions bot
added a commit
that referenced
this pull request
Feb 4, 2026
Version bump type: minor PR: #107 Title: feat(upload): add multipart upload support for large files up to 5GB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for uploading large files (up to 5GB) using Cloudflare R2's multipart upload API. Files larger than 50MB are automatically uploaded using chunked multipart uploads with progress tracking and resume capability.
Key Features
--chunk-sizeNew CLI Options
Architecture
Files Changed
src/index.tssrc/types/index.tswrangler.tomlcli/largeFileUpload.tscli/progressDisplay.tscli/resumeState.tscli/encryptionUtils.tscli/index.tsTechnical Details
LARGE_FILE_CONSTANTS)Testing
--list-uploadscommand worksKnown Limitations
Test plan
--resume, verify completion--list-uploadsshows interrupted uploads--abort-uploadcleans up properly🤖 Generated with Claude Code