tRPCttRPC
Powered by
VengeanceV
tRPC•2y ago•
2 replies
Vengeance

Send File Back From Procedure

Is there a way to send content like this back from a tRPC procedure?

  const headers = {
    "Content-Type": "application/vnd.apple.pkpass",
    "Content-Disposition": `attachment; filename=${passFilename}`,
    "Content-Length": passBuffer.length.toString(),
  };

  return new Response(passBuffer, { headers });
  const headers = {
    "Content-Type": "application/vnd.apple.pkpass",
    "Content-Disposition": `attachment; filename=${passFilename}`,
    "Content-Length": passBuffer.length.toString(),
  };

  return new Response(passBuffer, { headers });
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Revalidate API route from procedure
DavidDDavid / ❓-help
4y ago
How do you call a router procedure from another router procedure?
chicoCchico / ❓-help
2y ago
calling tRPC procedure from custom link
SparkSSpark / ❓-help
2y ago