mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
When pasting a long piece of text into the compose box (or message edit textarea), we show a banner giving an option to put the text into a file and upload it. The banner is only shown if the text is larger than `MINIMUM_PASTE_SIZE_FOR_FILE_TREATMENT`. If the user chooses to "convert to file", the textarea content is restored to its state before pasting and a file with the pasted content is uploaded. The banner is hidden as soon as any change is made to the textarea content to avoid inconsistent state and confusion. Fixes #33107. Co-authored-by: Aditya Chaudhary <aditya.chaudhary1558@gmail.com>