Use bucket path format
This commit is contained in:
parent
2bf37de50b
commit
5de4294919
1 changed files with 2 additions and 2 deletions
|
|
@ -21,11 +21,11 @@ function getR2() {
|
||||||
return {
|
return {
|
||||||
client: new S3Client({
|
client: new S3Client({
|
||||||
region: "auto",
|
region: "auto",
|
||||||
endpoint,
|
endpoint: `https://${accountId}.r2.cloudflarestorage.com`,
|
||||||
credentials: { accessKeyId, secretAccessKey: secretKey },
|
credentials: { accessKeyId, secretAccessKey: secretKey },
|
||||||
}),
|
}),
|
||||||
bucket,
|
bucket,
|
||||||
baseUrl: endpoint,
|
baseUrl: `https://${accountId}.r2.cloudflarestorage.com/${bucket}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue