RocketChat / RocketChat/Rocket.Chat

[BUG] Trying to download quoted attachments in an app forces you to default browser

Open
#25,008 0 comments 0 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:

If you upload a file (text file for example) to a conversation, when you click on it, a file browser will open so you can indicate where to save the file.
If you quote a message with this file, the "download" icon next to the file disappears. But clicking on the filename in the citation will open the default browser and download the file to the standard downloads directory.
It's not only a quote issue. Same with "discussion", "reply in DM"

Steps to reproduce:
  1. Open Rocketchat App no matter if it's on Windows or Mac
  2. Go to any conversation and attach a file.
  3. Quote the message containging attachment.
  4. Click on filename in a quote message
  5. It will download a file through your browser, not an app
Expected behavior:

A file explorer should be opened once you click on filename using an app

Actual behavior:

File is being downloaded through your browser

Server Setup Information:

Version of Rocket.Chat Server: 4.5.2
Operating System:
Deployment Method: docker (can reproduce in a snap deployment too)
Number of Running Instances: 1
DB Replicaset Oplog: oplog Enabled
NodeJS Version: v14.18.3
MongoDB Version: 4.4.11

Client Setup Information
  • Both Desktop App 3.8.1 and Chrome 99.0.4844.84
  • Windows, Mac
Additional context

Most likely this is due to the fact that in the first case (without quoting) the link to the file contains "?download".
In the quoted message, the link to the file does not contain "?download", so it's look's like a regular link, opens in a browser and then the file is being downloaded

Relevant logs:

There's no additional logs both from browser and server.

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

The report names no source files, tests, or entry points. Start by reproducing the behavior for normal and quoted attachments in the desktop app, then trace how each attachment link is opened. Done means quoted, discussed, and DM-replied attachments open the app's file-save flow instead of the default browser.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.