-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
🚀 feat: Implement S3
integration for file handling and image uploads
#6142
Draft
rubentalstra
wants to merge
15
commits into
main
Choose a base branch
from
GaelMartins0/main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,456
−887
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 tasks
S3
integration for file handling and image uploads
1 task
…improved error handling
for reference: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes: #3373
Closes: #2898
Docs: LibreChat-AI/librechat.ai#256
This pull request introduces support for AWS S3 as a file storage option in addition to Firebase. The key changes include adding the necessary configurations, dependencies, and methods to handle file operations with S3.
AWS S3 Integration:
.env.example
: Added environment variables for AWS S3 configuration, includingAWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_REGION
, andAWS_BUCKET_NAME
.api/package.json
: Added dependencies for AWS S3 client and presigner.api/server/services/AppService.js
: Updated to initialize S3 based on the file strategy configuration. [1] [2]api/server/services/Files/S3/initialize.js
: Created a module to initialize the AWS S3 client.File Operations:
api/server/services/Files/S3/crud.js
: Implemented CRUD operations for S3, including methods to upload, retrieve, and delete files.api/server/services/Files/S3/images.js
: Added functions to handle image-specific operations, such as resizing and uploading images to S3.api/server/services/Files/S3/index.js
: Consolidated S3-related modules for easier imports.Strategy Integration:
api/server/services/Files/strategies.js
: Integrated S3 as a file storage strategy, adding corresponding functions for file handling. [1] [2] [3]UI Integration:
client/src/components/Chat/Input/Files/SourceIcon.tsx
: Updated theSourceIcon
component to support S3 as a file source.Configuration:
librechat.example.yaml
: Added an example configuration for selecting the file strategy (S3 or Firebase).Change Type
Testing
Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.
Test Configuration:
Checklist