Upload files and folders from the UI#112
Open
goanpeca wants to merge 10 commits into
Open
Conversation
Extension Build ReadyDownload the VSIX from the workflow artifacts above. InstallationVS Code UI: Extensions > ... > Install from VSIX... CLI: |
There was a problem hiding this comment.
Pull request overview
Adds first-class UI support for uploading local files and folders into Backblaze B2 from the VS Code explorer, covering both an explicit command and OS drag-and-drop, with progress reporting, cancellation, overwrite confirmation, and empty-folder markers.
Changes:
- Introduces
b2.uploadFilescommand (menus + view title action) and upload orchestration (src/commands/uploadFiles.ts). - Adds tree drag-and-drop support for OS file/folder drops onto bucket/folder nodes (
B2TreeDragAndDropController), wired in during extension activation. - Extends transfer plumbing to pass through upload
contentType, and adds/updates test stubs + command tests for the new UI flows.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/suite/windowStubs.ts | Extends UI stubs to support and assert showOpenDialog usage in tests. |
| src/test/suite/extension.test.ts | Adds b2.uploadFiles to the expected contributed command list. |
| src/test/suite/commands.test.ts | Adds tests for file upload, recursive folder upload (incl. empty markers), and overwrite warning behavior. |
| src/services/fileTransfers.ts | Adds optional contentType support for streaming uploads (and empty-object uploads). |
| src/providers/b2TreeDragAndDropController.ts | Implements OS drag-and-drop URI extraction and delegates to upload logic. |
| src/extension.ts | Wires drag-and-drop controller into the B2 tree view and provides selection-based upload targeting. |
| src/commands/uploadFiles.ts | New command + shared upload implementation: entry collection, overwrite detection, progress/cancel, and error handling. |
| src/commands/index.ts | Registers b2.uploadFiles and passes required services (tree refresh, auth, selection). |
| scripts/release-contract.js | Updates release contract to include the new command and contributed manifest hash. |
| package.json | Contributes b2.uploadFiles command and adds it to view title + context menus for bucket/folder nodes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
goanpeca
marked this pull request as ready for review
July 2, 2026 16:33
goanpeca
force-pushed
the
feat/issue-56-upload-ui
branch
from
July 8, 2026 23:14
ce2f50a to
5a3e652
Compare
| fs.mkdirSync(folderPath); | ||
| fs.mkdirSync(secretPath); | ||
| fs.writeFileSync(path.join(secretPath, "credentials.txt"), "secret"); | ||
| fs.symlinkSync(secretPath, path.join(folderPath, "secrets"), "dir"); |
| const result = await callOriginalReaddir(...args); | ||
| if (String(args[0]) === folderPath && !swapped) { | ||
| fs.rmSync(nestedPath, { recursive: true, force: true }); | ||
| fs.symlinkSync(secretPath, nestedPath, "dir"); |
| mutableBucket.head = async () => { | ||
| if (!swapped) { | ||
| fs.rmSync(nestedPath, { recursive: true, force: true }); | ||
| fs.symlinkSync(secretPath, nestedPath, "dir"); |
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
Linked issue
Fixes #56
Tests run
Follow-up notes