First time running uploadthing in production (Vercel)

Apologize if this question has already been answered here, i've already searched Google and the questions channel but have not found a good answer. I just pushed my first deployment of uploadthing to my vercel production app and I am getting the following error when I try to upload an image: [UT] Call unsuccessful after 4 tries. Retrying in 8 seconds... I verified that the file was successfully uploaded to my uploadthing account, i've set UPLOADTHING_URL to my public facing vercel domain, and set the callbackUrl in my router config to ${process.env.NEXT_PUBLIC_URL}/api/uploadthing/ (Note: I had to do this because I am running my stack via lando locally) using the following:
export const { GET, POST } = createNextRouteHandler({
router: ourFileRouter,
config: {
callbackUrl: `${process.env.NEXT_PUBLIC_URL}/api/uploadthing/`,
},
});
export const { GET, POST } = createNextRouteHandler({
router: ourFileRouter,
config: {
callbackUrl: `${process.env.NEXT_PUBLIC_URL}/api/uploadthing/`,
},
});
Any tips on what I should look for next?
1 Reply
TheCodingTree 🌳
TheCodingTree 🌳OP•12mo ago
The issue appears to be with overriding the callbackUrl in my router config object. I removed this code (since the docs say it should only used to override the default upload path) and it now works! However, to get this to work locally I still needed to use a different callback domain, since I am using lando for my local stack. I was able to do that by setting UPLOADTHING_URL in my local .env.
Want results from more Discord servers?
Add your server