Fix R2 URL path with bucket name
This commit is contained in:
parent
b39f344426
commit
e37b9528f9
1 changed files with 2 additions and 1 deletions
|
|
@ -17,9 +17,10 @@ function getR2() {
|
||||||
region: "auto",
|
region: "auto",
|
||||||
endpoint: `https://${accountId}.r2.cloudflarestorage.com`,
|
endpoint: `https://${accountId}.r2.cloudflarestorage.com`,
|
||||||
credentials: { accessKeyId, secretAccessKey: secretKey },
|
credentials: { accessKeyId, secretAccessKey: secretKey },
|
||||||
|
forcePathStyle: true,
|
||||||
}),
|
}),
|
||||||
bucket,
|
bucket,
|
||||||
baseUrl: `https://${accountId}.r2.cloudflarestorage.com`,
|
baseUrl: `https://${accountId}.r2.cloudflarestorage.com/${bucket}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue