Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] support endpoint config for s3 #2718

Closed
NiuBlibing opened this issue Jun 25, 2024 · 6 comments
Closed

[FEATURE] support endpoint config for s3 #2718

NiuBlibing opened this issue Jun 25, 2024 · 6 comments
Labels
question Further information is requested

Comments

@NiuBlibing
Copy link

Describe the feature you'd like
Support endpoint config for s3, so we can use s3 compatiable service like minio, aliyun oss,etc.

@HenryHengZJ
Copy link
Contributor

which endpoint config? currently we support S3 for storage - https://docs.flowiseai.com/configuration/environment-variables#for-storage

@HenryHengZJ HenryHengZJ added the question Further information is requested label Jul 1, 2024
@NiuBlibing
Copy link
Author

NiuBlibing commented Jul 1, 2024

@NiuBlibing
Copy link
Author

If we can set this endpoint, it will be directly able to support s3 compatiable services like mino, aliyun oss,etc.

@NiuBlibing
Copy link
Author

diff --git a/packages/components/src/storageUtils.ts b/packages/components/src/storageUtils.ts
index 483eb9ae..44f2244b 100644
--- a/packages/components/src/storageUtils.ts
+++ b/packages/components/src/storageUtils.ts
@@ -318,6 +318,7 @@ export const getS3Config = () => {
     const secretAccessKey = process.env.S3_STORAGE_SECRET_ACCESS_KEY
     const region = process.env.S3_STORAGE_REGION
     const Bucket = process.env.S3_STORAGE_BUCKET_NAME
+    const endpoint = process.env.S3_ENDPOINT
     if (!region || !Bucket) {
         throw new Error('S3 storage configuration is missing')
     }
@@ -332,7 +333,8 @@ export const getS3Config = () => {
 
     const s3Client = new S3Client({
         credentials,
-        region
+        region,
+        endpoint: endpoint
     })
     return { s3Client, Bucket }
 }

I write a demo patch(I'm not familar with ts), could you help to commit it?

@HenryHengZJ
Copy link
Contributor

added PR - #2891

@HenryHengZJ
Copy link
Contributor

PR merged, will be pushed to next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants