-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: nextjs pages adapter response body #946
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
🦋 Changeset detectedLatest commit: e0dda6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
More templates
commit: |
📦 Bundle size comparison
|
A new canary is available for testing. You can install this latest build in your project with: pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add [email protected]
pnpm add @uploadthing/[email protected] |
@@ -38,6 +38,7 @@ export const createRouteHandler = <TRouter extends FileRouter>( | |||
for (const [name, value] of response.headers) { | |||
res.setHeader(name, value); | |||
} | |||
return res.json(response.body); | |||
// FIXME: Should be able to just forward it instead of consuming it first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice, but iI don't think this is a huge deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah lets just ship as-is and see if we ever find it high priority enough to optimize a little bit... the json blobs are never huge anyways so it's not like we're gonna load a bunch of stuff into memory
res.json(response.body)
resulted in{}
.couldn't find a way to forward the stream as-is, so consuming it and sending it down as JSON as a temporary workaround