Uploadthing and Clerk work together?
Hey all! I'm not a developer by any stretch of imagination, but I'm using Clerk for user management in a T3 web app I'm trying to develop. Can I use Uploadthing for the photos users will be uploading to their blog-like posts in my app or do I need to write my own auth code and forget about Clerk?
7 Replies
i don't think you need use any kind of auth for using upload thing.
Only authenticated users can upload photos, so it might matter.
Auth comes in before the request to upload stuff is made. Maybe you're mixing stuff up a bit
You're using the t3 stack, so, say a user hit's the "upload" endpoint or whatever in your server route. It will be "unauthorized" because the user is not authed in
Usually, in T3 what I see is that people (including theo) create a private procedure in TRPC. https://trpc.io/docs/server/procedures
Define Procedures | tRPC
A procedure is a function which is exposed to the client, it can be one of:
Auth is one thing, the other functionalities of you app are another thing. You can make it so that any functionality is unavailable if a user is not logged in
Thanks. Sounds like I can use them together.
Yep, you definitely can