RocketChat / RocketChat/Rocket.Chat

File download in chat is not working when Rocket Chat installed in subdir

Open
#20,640 4 comments 2 reactions 0 assignees View on GitHub

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:
  1. Install RocketChat in Subdir / subpath like domain.com/chat
  2. Upload an Image in Chat
  3. No Preview image available
Expected behavior:

Seeing a preview image after uploading an image

Actual behavior:

No preview Image
Bildschirmfoto 2021-02-08 um 08 14 55
Bildschirmfoto 2021-02-08 um 08 16 31

Server Setup Information:
Client Setup Information
  • Desktop App or Browser Version: Browser
  • Operating System: Win10 or MacOS 10,11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.