onClientUploadComplete is never called
I am trying to integrate UploadThing into my app. This is also my first time realy using it, but im having a bit of a problem.
Im quit confussed on how everything works, and i stuck with this problem.
In my Client the onClientUploadComplete never gets called, even when i have a callback URL that sends a 200 status.
The file gets Uploaded no problem, but the loading spinner never disapears and the code inside the onClientUploadComplete block also never "fire".
Here is some context of my Code:
app/api/uploadthing/core.ts
Here is my api route:
app/api/uploadthing/route.ts
This is my Callback URL:
app/api/uploadthing/callback/route.ts
And then last, this is my Client Side Page.
app/test/page.tsx
3 Replies
Disclaimer: I've never used UploadThing before, but I did notice that there seems to be a slight typo in the "app/api/uploadthing/route.ts" file, near "process.env.BASE_URL". There's no double-forward-slashes in the callback url.
Thank you for your answer, sadly that was not the problem, tge same problem still persists
I started getting this error too. nothing changed on the server side from my previous working version
Figured out the isssue was from my clerk middleware setup. api/uploadthing was not a reachable (public) route