-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Feat: AWS S3 support #4646
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
base: main
Are you sure you want to change the base?
Feat: AWS S3 support #4646
Conversation
- Added support for custom expiration and metadata in S3 presigned URL functions. - Replaced GridFS upload logic with S3 presigned URL-based uploads. - Updated API endpoints to handle S3 presigned uploads and return preview URLs. - Enhanced file upload controller to support S3 uploads with progress tracking. ```
Preview mcp_server Image: |
Preview sandbox Image: |
Preview fastgpt Image: |
Preview mcp_server Image: |
Preview sandbox Image: |
Preview fastgpt Image: |
- Add `isS3ClientInitialized` to check S3 client readiness - Update functions to handle uninitialized S3 client gracefully - Introduce `removeObjectsByPrefix` for bulk deletion by prefix - Modify `deleteChatFiles` to remove S3 files by chat ID - Adjust S3 upload logic to include chat ID in file paths - Add fallback to legacy upload for unsupported cases
Preview sandbox Image: |
Preview mcp_server Image: |
Preview fastgpt Image: |
Sweep Summary
Adds AWS S3 object storage support to FastGPT as an alternative file storage option for chat files.
packages/service/common/file/s3/index.ts
using Minio library for bucket operations and presigned URL generation.projects/app/src/pages/api/common/file/s3PresignedUpload.ts
to handle S3 presigned URL generation with proper authentication.projects/app/src/web/common/file/controller.ts
to use S3 for chat files while keeping MongoDB GridFS for dataset files..env.template
and updated system initialization to verify S3 bucket existence on startup.Ask Sweep AI questions about this PR