You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/common/src/utils/storage.manager.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ function createS3Adapter(config) {
36
36
upload: async(path,buffer,options={})=>{
37
37
try{
38
38
constcommand=newPutObjectCommand({
39
-
Bucket: activeBucket,
39
+
Bucket: config.bucket,
40
40
Key: path,
41
41
Body: buffer,
42
42
ContentType: options.contentType
@@ -51,7 +51,7 @@ function createS3Adapter(config) {
51
51
try{
52
52
constobjects=paths.map(p=>({Key: p}));
53
53
constcommand=newDeleteObjectsCommand({
54
-
Bucket: activeBucket,
54
+
Bucket: config.bucket,
55
55
Delete: {Objects: objects}
56
56
});
57
57
awaits3Client.send(command);
@@ -68,7 +68,7 @@ function createS3Adapter(config) {
68
68
actualPrefix=prefix+options.search;
69
69
}
70
70
constcommand=newListObjectsV2Command({
71
-
Bucket: activeBucket,
71
+
Bucket: config.bucket,
72
72
Prefix: actualPrefix,
73
73
MaxKeys: options.limit||100
74
74
});
@@ -93,14 +93,14 @@ function createS3Adapter(config) {
93
93
return{
94
94
data: {
95
95
publicUrl: null,
96
-
error: `Cloudflare R2 requires a "Public URL Host" or a custom domain. Current endpoint [${config.endpoint}] for bucket [${activeBucket}] might not be publicly accessible.`
96
+
error: `Cloudflare R2 requires a "Public URL Host" or a custom domain. Current endpoint [${config.endpoint}] for bucket [${config.bucket}] might not be publicly accessible.`
0 commit comments