RocketChat / RocketChat/Rocket.Chat
File download in chat is not working when Rocket Chat installed in subdir
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
After updating from 3.6.3 to 3.11.0, when uploading a file (image, pdf) the preview URL is missing the subdir path. The download button for images is the correct URL for pdf not.
Steps to reproduce:
- Install RocketChat in Subdir / subpath like domain.com/chat
- Upload an Image in Chat
- No Preview image available
Expected behavior:
Seeing a preview image after uploading an image
Actual behavior:
No preview Image


Server Setup Information:
- Version of Rocket.Chat Server: 3.11.0
- Operating System: Debian 10
- Deployment Method: https://docs.rocket.chat/installation/manual-installation/debian
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: v12.20.1
- MongoDB Version: 4.0.19 / wiredTiger (oplog active)
Client Setup Information
- Desktop App or Browser Version: Browser
- Operating System: Win10 or MacOS 10,11
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
Start by reproducing the issue with Rocket.Chat installed under a subpath such as /chat, then trace how uploaded-image preview and PDF download URLs are constructed. Done means both URLs preserve the subdirectory path and image previews and PDF downloads work correctly.
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
- 42/100