RobCipolla
TTCTheo's Typesafe Cult
•Created by RajatDas on 4/22/2024 in #questions
Use AWS S3 to store files
Exactly this!
8 replies
TTCTheo's Typesafe Cult
•Created by RajatDas on 4/22/2024 in #questions
Use AWS S3 to store files
It's not "complicated" per say. But in the context of this question Uploadthing is supposed to be a quick solution.
8 replies
TTCTheo's Typesafe Cult
•Created by RajatDas on 4/22/2024 in #questions
Use AWS S3 to store files
I mean. Your files are on S3.
But also this kind of defeats the point of using something like uploadthing, which takes away the hassle of having to deal with the complexities and annoyances of AWS.
If that is something you want to do, you could look into the source code for uploadtbing and how it works and how you can run your own solution?
8 replies
TTCTheo's Typesafe Cult
•Created by RobCipolla on 4/9/2024 in #questions
Clerk and tRPC "protectedProcedures" on the server.
Figured it out.
@Matvey was right.
I can add Clerk's auth object to the server side context in
/src/trpc/server.ts
like so:
7 replies
TTCTheo's Typesafe Cult
•Created by RobCipolla on 4/9/2024 in #questions
Clerk and tRPC "protectedProcedures" on the server.
I suppose the question is... how do I get Clerk's auth object in the context when following this example from tRPC?
https://trpc.io/docs/server/server-side-calls#context-with-middleware-example
7 replies
TTCTheo's Typesafe Cult
•Created by RobCipolla on 4/9/2024 in #questions
Clerk and tRPC "protectedProcedures" on the server.
Not quite...
The method Theo uses in the video for adding the Clerk auth object to the ctx works a charm.
However, I experimented with the Create T3 App App router and using tRPC on ther server. You know using
import { api } from "@/trpc/server";
instead of import { api } from "@/trpc/react";
.
The problem is (if my understanding is correct) because Next server components don't have access to the Request object, I can't figure how to pass the auth object to the ctx when using tRPC on the server... (really not sure if this is making sense).
I am looking to make sure these requests are authed:
These ones work fine:
I THINK it is because the server side api
call for tRPC is created in server/trpc/api.ts
where the context passed to it doesn't get access to the request object - which the clerk getAuth()
method requires in order to create it's auth object.
where as I can pass the auth object to the clerk context in for client side components similar to the way Theo did in the tutorial.7 replies