Skip to content

Conversation

@MarcAmick
Copy link
Contributor

Pull Request Template

Summary

Implement a max size for conversations imports to prevent bringing down the application by uploading a large file. Also modified import endpoint such that if any error does occur, it bubbles the error up and the front end displays an error message. Before this fix, it returns a 200 and the front end says the import was successful when an error occurs.

Addresses issue: #10011

Change Type

  • Bug fix (non-breaking change which fixes an issue)

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.

  • tested manually that the CONVERSATION_IMPORT_MAX_FILE_SIZE_BYTES env file defaults to 0 which allows all files to be uploaded
  • tested manually that the CONVERSATION_IMPORT_MAX_FILE_SIZE_BYTES when set to a number prevents a file from being uploaded in the front end code if it exceeds the number in bytes
  • tested manually that the CONVERSATION_IMPORT_MAX_FILE_SIZE_BYTES will prevent the file from being parsed in the BACK END) if a file is uploaded that exceeds the number of bytes. This is of course to prevent malicious attempts of uploading a large file by bypassing the front end check

Test Configuration:

Checklist

Please delete any irrelevant options.

@danny-avila danny-avila changed the title bugfix: Check file size of conversation being imported against a configured max to prevent large conversations imports from crashing librechat ⚖️ fix: Add Configurable File Size Cap for Conversation Imports Oct 7, 2025
@danny-avila danny-avila changed the base branch from main to dev October 7, 2025 18:25
@danny-avila danny-avila force-pushed the bug-large-conversation-import-will-crash-librechat branch from 4130f20 to a1e9d46 Compare October 7, 2025 18:26
Marc Amick and others added 2 commits October 7, 2025 14:33
…ax size to prevent bringing down the application by uploading a large file

chore: remove non-english localization as needs to be added via locize
@danny-avila danny-avila force-pushed the bug-large-conversation-import-will-crash-librechat branch from a1e9d46 to 8765bf6 Compare October 7, 2025 18:38
@danny-avila
Copy link
Owner

Updated branch, resolved merge conflict, and removed all non-English localizations since they must be added through Locize:
https://www.librechat.ai/docs/translation#how-translations-work

@danny-avila danny-avila merged commit e9b678d into danny-avila:dev Oct 7, 2025
7 checks passed
arbreton pushed a commit to arbreton/LibreChat that referenced this pull request Oct 9, 2025
…y-avila#10012)

* Check file size of conversation being imported against a configured max size to prevent bringing down the application by uploading a large file

chore: remove non-english localization as needs to be added via locize

* feat: Implement file size validation for conversation imports to prevent oversized uploads

---------

Co-authored-by: Marc Amick <[email protected]>
Co-authored-by: Danny Avila <[email protected]>
Francistab705 pushed a commit to Francistab705/LibreChat that referenced this pull request Oct 27, 2025
…y-avila#10012)

* Check file size of conversation being imported against a configured max size to prevent bringing down the application by uploading a large file

chore: remove non-english localization as needs to be added via locize

* feat: Implement file size validation for conversation imports to prevent oversized uploads

---------

Co-authored-by: Marc Amick <[email protected]>
Co-authored-by: Danny Avila <[email protected]>
JustinBeaudry pushed a commit to Actual-Reality/LibreChat that referenced this pull request Nov 12, 2025
…y-avila#10012)

* Check file size of conversation being imported against a configured max size to prevent bringing down the application by uploading a large file

chore: remove non-english localization as needs to be added via locize

* feat: Implement file size validation for conversation imports to prevent oversized uploads

---------

Co-authored-by: Marc Amick <[email protected]>
Co-authored-by: Danny Avila <[email protected]>
Guiraud pushed a commit to Guiraud/LibreChat that referenced this pull request Nov 21, 2025
…y-avila#10012)

* Check file size of conversation being imported against a configured max size to prevent bringing down the application by uploading a large file

chore: remove non-english localization as needs to be added via locize

* feat: Implement file size validation for conversation imports to prevent oversized uploads

---------

Co-authored-by: Marc Amick <[email protected]>
Co-authored-by: Danny Avila <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants