Repository navigation
Bring over upload from the widgets so it can be reused - #354
Open
SharonStrats wants to merge 3 commits into
Open
SharonStrats wants to merge 3 commits into
SharonStrats wants to merge 3 commits into
Conversation
Prompt: move the uploadFiles from solid-ui widgets to resource logic, remove ui, add resilient file failure, return structured messages for results. Co-authored-by: GPT-5.6 Luna <gpt-5.6-luna@openai.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The upload handler reports fulfilled non-2xx PUT responses as successful, and recognized images are routed to the wrong folder when the browser omits their MIME type.
2 open issues
What changed in this PR
Adds reusable file uploads to SolidOS resource logic, making upload behavior available outside widgets.
Changes:
- Adds batch uploads with MIME detection, image-folder routing, and per-file results.
- Exports upload result and error types and adds upload tests.
- Adds
mime-types, bumps the package version, and refreshes locked dependencies.
| File | Description |
|---|---|
test/resourceLogic.test.ts |
Tests image uploads and independent per-file failures. |
src/types.ts |
Defines upload results, errors, and the resource upload API. |
src/resource/resourceLogic.ts |
Implements file reading, destination selection, and PUT uploads. |
src/index.ts |
Exports the upload result type and error class. |
package.json |
Adds mime-types and increments the package version. |
package-lock.json |
Records the dependency addition and refreshed dependency versions. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
SharonStrats
force-pushed
the
add-upload
branch
from
November 6, 2026 23:05
290c088 to
bfd60a5
Compare
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.


Add the upload to resource logic