diff --git a/src/app/api/upload/route.ts b/src/app/api/upload/route.ts index 53b94fa..d82b164 100644 --- a/src/app/api/upload/route.ts +++ b/src/app/api/upload/route.ts @@ -9,6 +9,9 @@ function getR2() { const secretKey = "244fcc44041f452241cbc68374cd7a6ca651cb71f361bc36cc932407bbe37863"; const bucket = "tia"; + // Try just account-level endpoint (no bucket in path) + const endpoint = `https://${accountId}.r2.cloudflarestorage.com`; + if (!accountId || !accessKeyId || !secretKey || !bucket) { throw new Error(`Missing R2 config`); }