Skip to content

fix(start): keep file and blob metadata in server function uploads - #2370

Merged
birkskyum merged 1 commit into
mainfrom
fix/upload-blob-metadata
Nov 2, 2026
Merged

birkskyum merged 1 commit into
mainfrom
fix/upload-blob-metadata

Conversation

@lxsmnsyc

@lxsmnsyc lxsmnsyc commented Nov 2, 2026

Copy link
Copy Markdown
Member

A multipart part always arrives on the server as a File. A blob comes back as a File named blob, an empty type becomes application/octet-stream, lastModified is the time the server parsed the request, and %22 in a name is decoded to ".

The upload node now carries the type, plus the name and lastModified for a file. The server rebuilds a Blob or File from those fields over the part's bytes, without copying them. A node with only the index, sent by a tab opened before a deploy, still reads as the raw part.

  • packages/start/src/fns/uploads.ts: write and read the metadata fields
  • packages/start/src/fns/uploads.spec.ts: tests for blobs, empty types, exact names, lastModified, and index-only nodes
  • Patch changeset for @solidjs/start

Checked locally: tsc --noEmit, vitest run (300 tests), oxfmt --check.

🤖 Generated with Claude Code

A multipart part always arrives as a file, with `application/octet-stream`
for an empty type, a `lastModified` of the time the server parsed it, and
`%22` in the name decoded to `"`. The upload node now carries the type,
and for a file the name and `lastModified`, and the server rebuilds the
value from them over the part's bytes. A node with only the index, from an
older client, still reads as the part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1cf6eba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 1cf6eba
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6ae84b28cc17eaddb8e1e35e
😎 Deploy Preview https://deploy-preview-2370--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Nov 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2370

commit: 1cf6eba

@birkskyum
birkskyum merged commit 2f009ff into main Nov 2, 2026
13 checks passed
@birkskyum
birkskyum deleted the fix/upload-blob-metadata branch November 2, 2026 13:20
ryansolid pushed a commit to solidjs/solid that referenced this pull request Nov 2, 2026
A multipart part always arrives as a file, with `application/octet-stream`
for an empty type, a `lastModified` of the time the server parsed it, and
`%22` in the name decoded to `"`. The upload node now carries the type,
and for a file the name and `lastModified`, and the server rebuilds the
value from them over the part's bytes. A node with only the index, from an
older client, still reads as the part.

Ports solidjs/solid-start#2370.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants