Repository navigation
feat(blob): accept nuxt/server events - #937
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
playground | 780b3e9 | Commit Preview URL Branch Preview URL |
Oct 20 2026, 10:14 AM |
…-event Amp-Thread-ID: https://ampcode.com/threads/T-01a158c6-4817-7098-86c6-d7e2da6ee322 # Conflicts: # playground/package.json # pnpm-lock.yaml # src/blob/lib/storage.ts # test/blob.test.ts
Also check path traversal through the `nuxt/server` serve route. Amp-Thread-ID: https://ampcode.com/threads/T-01a158c6-4817-7098-86c6-d7e2da6ee322 Co-authored-by: Sebastien Chopin <[email protected]>
commit: |
atinux
marked this pull request as ready for review
October 20, 2026 12:28
This was referenced Oct 20, 2026
atinux
approved these changes
Oct 20, 2026
Contributor
|
Thank you for the PR! |
1 of 7 tasks
This branch was successfully deployed
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.
Nuxt 4.6 added
nuxt/server, a server import surface that is not tied to h3 or Nitro. This letsblob.serve,blob.handleUploadandblob.handleMultipartUploadbe called from a handler defined with itsdefineEventHandler. Same approach as atinux/nuxt-auth-utils#544.What changed
handleMultipartUploadis widened toBlobEvent = H3Event | RequestEvent. The implementation still goes through h3. On Nitro 2 the event anuxt/serverhandler receives is a proxy over the h3 event, so the h3 helpers keep working on it.RequestEventis declared insrc/blob/types/event.tsinstead of imported, becausenuxt/serverdoes not resolve below Nuxt 4.6. Thenuxtand@nuxt/kitranges are untouched.pathnamehandling is unchanged.getRouterParamsfromnuxt/serverreturns raw segments andblob.servealready decodes them.Tests
nuxt/serverroutes for upload, serve and multipart, plus an h3 multipart route. The new tests compare status, headers and bodies between the two handler styles.server/api/nuxt-server/blob.BLOB_READ_WRITE_TOKEN, the Vercel driver'shandleMultipartUploadgenerates a client token from both handler styles. No real upload to Vercel was made.@nuxt/kitand@nuxt/schemapinned to 4.3.1, the packed module installs, typechecks, builds and serves h3 upload, serve and multipart routes.Notes
mainalready moved the playground to Nuxt 4.6.2, so this PR no longer touchespackage.jsonor the lockfile.handleMultipartUploadwrites the response itself instead of returning aResponse.eventparam ofserve,handleUploadandhandleMultipartUploadasH3Event | RequestEventand show anuxt/serverexample forserve.nuxt/serverserve route.