Returning new Response

Using t3 app router boilerplate code. I want to return a file but it doesn't work. Procedure returns:
return new Response(archive, {
status: 404,
headers: {
"Content-Type": "application/zip",
},
});
return new Response(archive, {
status: 404,
headers: {
"Content-Type": "application/zip",
},
});
Network tab:
No description
No description
Solution:
trpc procedure can't return a response, you can return the text or binary data from the procedure or create an api route
Jump to solution
1 Reply
Solution
Matvey
Matvey12mo ago
trpc procedure can't return a response, you can return the text or binary data from the procedure or create an api route
Want results from more Discord servers?
Add your server