RocketChat / RocketChat/Rocket.Chat
Uploading an image while file upload is disabled
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
We disabled all file uploads for our rocket chat instance. This works for "normal" file uploads. But if a user copies and pastes an image into the text box of a chat window, the dialog to upload a file is displayed. When file uploads are disabled, this dialog shouldn't even be displayed.
When the user tries to upload the image, the upload will be correctly blocked. But the displayed error message can't be customized/translated.
Steps to reproduce:
- Disable all fileuploads in rocket-chat administration
- Copy and paste an image in the textbox of a chat window
- Try to send the image
Expected behavior:
The dialog to upload the image shouldn't even be displayed.
Alternatively the error message for the rejected file upload should be customizable via translation files.
Actual behavior:
The dialog to upload an image is displayed. The upload will be blocked but the resulting error message can't be customized/translated.

Server Setup Information:
- Version of Rocket.Chat Server: 3.15.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by disabling file uploads, then pasting an image into a chat textbox and attempting to send it. Trace the frontend path from the paste event to the upload dialog and the file-upload setting; done means the dialog is suppressed when uploads are disabled, or the rejected-upload message is available through translations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100