Fix R2 URL path with bucket name

This commit is contained in:
Manohar Gupta 2026-05-10 14:22:32 +05:30
parent b39f344426
commit e37b9528f9

View file

@ -17,9 +17,10 @@ function getR2() {
region: "auto",
endpoint: `https://${accountId}.r2.cloudflarestorage.com`,
credentials: { accessKeyId, secretAccessKey: secretKey },
forcePathStyle: true,
}),
bucket,
baseUrl: `https://${accountId}.r2.cloudflarestorage.com`,
baseUrl: `https://${accountId}.r2.cloudflarestorage.com/${bucket}`,
};
}