[GH-ISSUE #19465] feat: Expose PASTED_TEXT_CHARACTER_LIMIT as environment variable to control paste as attachment #57557

Closed
opened 2026-05-05 21:06:27 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ben-kenney on GitHub (Nov 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19465

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

If a user has the setting "Paste Large Text as File" toggled on, then any text larger than 1000 characters will be uploaded as a file. It would be nice to have this character limit exposed as a user setting.

Indeed there appears to be a variable called PASTED_TEXT_CHARACTER_LIMIT (PR #7020) in the code which is hard coded for 1000 characters. It would be great if this could be exposed as an environment variable for more user control.

Doing so could make it easier for users to review their old prompts in certain situations.

Desired Solution you'd like

Allow users to configure PASTED_TEXT_CHARACTER_LIMIT= in their .env file to control the number of characters before pasted text gets converted into a file upload.

Alternatives Considered

No response

Additional Context

No response

Originally created by @ben-kenney on GitHub (Nov 25, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19465 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description If a user has the setting "Paste Large Text as File" toggled on, then any text larger than 1000 characters will be uploaded as a file. It would be nice to have this character limit exposed as a user setting. Indeed there appears to be a variable called `PASTED_TEXT_CHARACTER_LIMIT` (PR #7020) in the code which is hard coded for 1000 characters. It would be great if this could be exposed as an environment variable for more user control. Doing so could make it easier for users to review their old prompts in certain situations. ### Desired Solution you'd like Allow users to configure PASTED_TEXT_CHARACTER_LIMIT=<character limit> in their `.env` file to control the number of characters before pasted text gets converted into a file upload. ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57557