Fix R2 endpoint with bucket path

This commit is contained in:
Manohar Gupta 2026-05-10 14:30:29 +05:30
parent 5de4294919
commit 864ecc2587

View file

@ -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,