diff --git a/src/app/api/upload/route.ts b/src/app/api/upload/route.ts index f51977c..b2f83d6 100644 --- a/src/app/api/upload/route.ts +++ b/src/app/api/upload/route.ts @@ -21,11 +21,11 @@ function getR2() { return { client: new S3Client({ region: "auto", - endpoint, + endpoint: `https://${accountId}.r2.cloudflarestorage.com`, credentials: { accessKeyId, secretAccessKey: secretKey }, }), bucket, - baseUrl: endpoint, + baseUrl: `https://${accountId}.r2.cloudflarestorage.com/${bucket}`, }; }