Repository navigation
feat: drag-and-drop uploads and guarded overwrite of existing objects - #51
Open
curlysasha wants to merge 1 commit into
Open
curlysasha wants to merge 1 commit into
curlysasha wants to merge 1 commit into
Conversation
Uploads can now be started by dropping files or folders onto a bucket folder. Before queuing, a new plan_upload command reports destination objects that already exist, and the user chooses Overwrite, Skip existing, or Cancel. Overwrites are conditional on the reviewed ETag (If-Match), so an object changed in the meantime is left untouched; uploads without approval stay create-only and now explain the conflict instead of surfacing a raw PreconditionFailed error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
onDragDropEvent), not HTML5 drop events, which is why dropping did nothing before. A drop-zone overlay shows the destination while dragging.plan_uploadcommand classifies the selected paths (files/folders) and reports which destination keys already exist (HEAD for single files, a scoped listing per folder). If any exist, a dialog offers Overwrite, Skip existing, or Cancel. The same path is used by Upload → Files/Folder and by drag and drop.If-Matchon the reviewed ETag (newreplace_etagon the job, used by both single-partPutObjectand multipart completion). If the object changed after the check, it is left untouched. Uploads without approval stay create-only (If-None-Match: *) as before.PreconditionFailed.Why
Uploading a file whose name already existed always failed with an opaque precondition error, and there was no way to overwrite or skip. Dragging files onto the window did nothing.
Scope
Verification
Tested locally (release build installed over 0.2.46 on Windows 11)
Added or updated docs
Added or updated tests where needed
Rust: 149 tests pass, clippy clean. New tests cover path classification and duplicate keys, the create-only conflict message, and
If-Matchfor an approved overwrite.Frontend: typecheck, lint, 122 unit tests pass.
Playwright (Chromium): 51 pass, including new tests for dropping files and for the Cancel/Skip/Overwrite conflict choices. WebKit was not run locally.
Notes
queue_uploadgains an optionalreplaceEtag, andqueue_folder_uploadgains optionalreplace(key → ETag) andskiplists. Callers that omit them get the previous create-only behavior.🤖 Generated with Claude Code