RocketChat / RocketChat/Rocket.Chat

Unable to open an uploaded file from a Livechat after the chat is closed, getting a forbidden error

Open
#18,591 4 comments 0 reactions 1 assignee View on GitHub

@renatobecker is already working on this.

Since Aug 18, 2020.

stale subj: livechat
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

I uploaded a file through a Livechat, chatting with my main user (admin).
When the chat is still opened, I can click the "cloud" to download the file without any issue.
If I go to the Omichannel Admin / Current Chats and open up the chat containing the upload, I get a Forbidden error when I try to download the file.

I'm also sending my data to my CRM on chat close, including the link to the file, which ends up being forbidden too, of course.

Steps to reproduce:
  1. Open a Livechat (you need Omnichannel active and an agent to answer the chat)
  2. Send a file from the Livechat
  3. Try downloading the file here (this should work)
  4. From main Rocket Chat, close the livechat
  5. Go to the Omnichannel admin menu (in the 3 dots menu) and go to Current chats
  6. Open the conversation you just closed and try to download the file (this won't work)
Expected behavior:

The link to the uploaded file should always work, even after the chat is closed, and the link sent with the JSON should always remain active too.

Actual behavior:

As soon as the chat is closed, the file becomes "Forbidden".

Server Setup Information:
  • Version of Rocket.Chat Server: 3.5.0
  • Operating System: Debian through a WSL2 docker container
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.16.1
  • MongoDB Version: 4.0.19
Client Setup Information
  • Desktop App or Browser Version: Chrome 84.0.4147.125
  • Operating System: Windows 10 2004
Relevant logs:

I don't see any errors in the logs

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.