Send extra info (student id) to upload functionality
I have this client component:
Here is my core.ts
i did this and it did not work because i think i am trying to call server action like this. Is there a way I can pass extra into to the upload function or middleware so i can call this server action in the same file as "api/uploadthing/core.ts" ? Or is there a better way to do this? All I am trying to do is, after a document is uploaded, I call a server action that will update the student's document with the file url. I cannot use the auth() because student is not who logs in, it is my users who "have" stdudents. Students aren't my users. So, I can't get their Id from auth.
0 Replies