The image is stored on UploadThing but it doesn't return the url

Hello everyone, Locally, everything works correctly, including image uploads, but in production, it's not the case. Could this be due to a Cloudflare block? Is there something additional that I'm missing? The API runs on Next.js. Here is my route.ts file:
import { createRouteHandler } from "uploadthing/next";

import { ourFileRouter } from "./core";

// Export routes for Next App Router
export const { GET, POST } = createRouteHandler({
router: ourFileRouter,
config: {
isDev: process.env.NODE_ENV === "development",
callbackUrl: process.env.UPLOADTHING_CALLBACK_URL,
},
});
import { createRouteHandler } from "uploadthing/next";

import { ourFileRouter } from "./core";

// Export routes for Next App Router
export const { GET, POST } = createRouteHandler({
router: ourFileRouter,
config: {
isDev: process.env.NODE_ENV === "development",
callbackUrl: process.env.UPLOADTHING_CALLBACK_URL,
},
});
{"message":"Sending presigned URLs to client","logLevel":"INFO","timestamp":"2025-03-11T07:53:13.713Z","annotations":{"presignedUrls":[{"url":"https://sea1.ingest.uploadthing.com/MgfNmNCga8y0vk4djU9qoTDP6CRgpuFB87znbVU9xJ4sYScr?expires=1741683193708&x-ut-identifier=pg88ouysw5&x-ut-file-name=Capture%2520d%27%25C3%25A9cran%25202025-01-31%2520154347.png&x-ut-file-size=65022&x-ut-file-type=image%252Fpng&x-ut-slug=imageUploader&x-ut-content-disposition=inline&signature=hmac-sha256%3D54c8273107389b67fab19300f8b366ed447f49d34e61c49a71cb1b007b0d6e0b","key":"MgfNmNCga8y0vk4djU9qoTDP6CRgpuFB87znbVU9xJ4sYScr","name":"Capture d'écran 2025-01-31 154347.png","customId":null}]},"spans":{"handleUploadAction":25},"fiberId":"#16"}
{"message":"Failed to register metadata","logLevel":"ERROR","timestamp":"2025-03-11T07:53:24.256Z","annotations":{"error":{"request":{"_id":"@effect/platform/HttpClientRequest","method":"POST","url":"https://sea1.ingest.uploadthing.com/route-metadata","urlParams":[],"hash":{"_id":"Option","_tag":"None"},"headers":{"x-uploadthing-api-key":"<redacted>","x-uploadthing-version":"7.5.2","x-uploadthing-be-adapter":"nextjs-app","x-uploadthing-fe-package":"@uploadthing/react","content-type":"application/json","content-length":"214","b3":"fbf1eeee60347aa9f4253e8ae221d1de-d41f95bc2f0262ed-1-c5779e37d909dc50","traceparent":"00-fbf1eeee60347aa9f4253e8ae221d1de-d41f95bc2f0262ed-01"},"body":{"_id":"@effect/platform/HttpBody","_tag":"Uint8Array","body":"{\"fileKeys\":[\"MgfNmNCga8y0vk4djU9qoTDP6CRgpuFB87znbVU9xJ4sYScr\"],\"metadata\":{\"userId\":\"fakeId\"},\"isDev\":false,\"callbackUrl\":\"https://workyt.fr/api/uploadthing\",\"callbackSlug\":\"imageUploader\",\"awaitServerData\":true}","contentType":"application/json","contentLength":214}},"reason":"Transport","cause":{},"_tag":"RequestError"}},"spans":{"handleUploadAction":10568},"fiberId":"#20"}
{"message":"Sending presigned URLs to client","logLevel":"INFO","timestamp":"2025-03-11T07:53:13.713Z","annotations":{"presignedUrls":[{"url":"https://sea1.ingest.uploadthing.com/MgfNmNCga8y0vk4djU9qoTDP6CRgpuFB87znbVU9xJ4sYScr?expires=1741683193708&x-ut-identifier=pg88ouysw5&x-ut-file-name=Capture%2520d%27%25C3%25A9cran%25202025-01-31%2520154347.png&x-ut-file-size=65022&x-ut-file-type=image%252Fpng&x-ut-slug=imageUploader&x-ut-content-disposition=inline&signature=hmac-sha256%3D54c8273107389b67fab19300f8b366ed447f49d34e61c49a71cb1b007b0d6e0b","key":"MgfNmNCga8y0vk4djU9qoTDP6CRgpuFB87znbVU9xJ4sYScr","name":"Capture d'écran 2025-01-31 154347.png","customId":null}]},"spans":{"handleUploadAction":25},"fiberId":"#16"}
{"message":"Failed to register metadata","logLevel":"ERROR","timestamp":"2025-03-11T07:53:24.256Z","annotations":{"error":{"request":{"_id":"@effect/platform/HttpClientRequest","method":"POST","url":"https://sea1.ingest.uploadthing.com/route-metadata","urlParams":[],"hash":{"_id":"Option","_tag":"None"},"headers":{"x-uploadthing-api-key":"<redacted>","x-uploadthing-version":"7.5.2","x-uploadthing-be-adapter":"nextjs-app","x-uploadthing-fe-package":"@uploadthing/react","content-type":"application/json","content-length":"214","b3":"fbf1eeee60347aa9f4253e8ae221d1de-d41f95bc2f0262ed-1-c5779e37d909dc50","traceparent":"00-fbf1eeee60347aa9f4253e8ae221d1de-d41f95bc2f0262ed-01"},"body":{"_id":"@effect/platform/HttpBody","_tag":"Uint8Array","body":"{\"fileKeys\":[\"MgfNmNCga8y0vk4djU9qoTDP6CRgpuFB87znbVU9xJ4sYScr\"],\"metadata\":{\"userId\":\"fakeId\"},\"isDev\":false,\"callbackUrl\":\"https://workyt.fr/api/uploadthing\",\"callbackSlug\":\"imageUploader\",\"awaitServerData\":true}","contentType":"application/json","contentLength":214}},"reason":"Transport","cause":{},"_tag":"RequestError"}},"spans":{"handleUploadAction":10568},"fiberId":"#20"}
Next.js v14.2.23
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?