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 {
|
||||
client: new S3Client({
|
||||
region: "auto",
|
||||
endpoint,
|
||||
endpoint: `https://${accountId}.r2.cloudflarestorage.com`,
|
||||
credentials: { accessKeyId, secretAccessKey: secretKey },
|
||||
}),
|
||||
bucket,
|
||||
baseUrl: endpoint,
|
||||
baseUrl: `https://${accountId}.r2.cloudflarestorage.com/${bucket}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue