From 864ecc258722ce7486231ce070823fc943837f9c Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 10 May 2026 14:30:29 +0530 Subject: [PATCH] Fix R2 endpoint with bucket path --- src/app/api/upload/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/upload/route.ts b/src/app/api/upload/route.ts index b2f83d6..30c2439 100644 --- a/src/app/api/upload/route.ts +++ b/src/app/api/upload/route.ts @@ -21,7 +21,7 @@ function getR2() { return { client: new S3Client({ region: "auto", - endpoint: `https://${accountId}.r2.cloudflarestorage.com`, + endpoint: `https://${accountId}.r2.cloudflarestorage.com/${bucket}`, credentials: { accessKeyId, secretAccessKey: secretKey }, }), bucket,