Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong url to download files (but preview is ok) when Rocket.Chat is accessed from a sub-url #14746

Closed
phasenohr opened this issue Jun 5, 2019 · 7 comments
Labels
duplicate Closed as Duplicate

Comments

@phasenohr
Copy link

Description:

My rocketchat instance is running at chat.xxx.zzz:3000 and is accessed through a reverse proxy via https://fqdn/apps/chat
I followed the instructions on how to set-up RocketChat in a subfolder behind a proxy and it works fine except when one tries to download files that have been uploaded for sharing.
The url used to provide access to the file is https://fqdn/file-upload/..... instead of https://fqdn/apps/chat/file-upload/... but the preview of the file is available! (in case the uploaded file is e.g. a png)

Steps to reproduce:

  1. Run rocketchat in a subfolder behind a reverse proxy according to the instructions at https://rocket.chat/docs/installation/manual-installation/running-in-a-sub-folder/
  2. User A opens a chat with user B
  3. User A clicks on + and select an image file
  4. User B sees the image in his chat but when he clicks on the filename to download it, it fails because the path to the file is wrong (https://fqdn/file-upload/... instead of https://fqdn/apps/chat/file-upload/...)

Expected behavior:

I should be able to view a shared file if it is in a suitable format and to download it (especially considering that the preview is working!)

Actual behavior:

I can view a shared file file if it is in a suitable format but cannot download it because the url is wrong.

Server Setup Information:

  • Version of Rocket.Chat Server: 1.0.3
  • Operating System:
  • Deployment Method: Docker (based on the official Docker compose file)
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 4
@phasenohr phasenohr changed the title Wrong url to download files (but preview is ok) when Rocket.Chat is installed at a sub-url Wrong url to download files (but preview is ok) when Rocket.Chat is accessed from a sub-url Jun 5, 2019
@ura14h
Copy link
Contributor

ura14h commented Jun 6, 2019

Same issue? #14472

@serviceman
Copy link

I had this issue as well, but when I upgraded to version 1.1.0 it was fixed. I would recommend upgrading to at least 1.1.0 as it fixed a lot of other issues present in 1.0.3 as well.

@reetp
Copy link

reetp commented Jun 6, 2019

@rocket-cat label add duplicate

@rocket-cat rocket-cat bot added the duplicate Closed as Duplicate label Jun 6, 2019
@reetp
Copy link

reetp commented Jun 6, 2019

@rocket-cat close

Marking as duplicate of #14472 and fixed in PR #14485

Please upgrade for a fix

@rocket-cat rocket-cat bot closed this as completed Jun 6, 2019
@phasenohr
Copy link
Author

Thank you, I did not see issue #14472 that is exactly the same as mine.
Regarding the upgrade to 1.1.0, I will give it a try again but when I tried it, I found out that the SAML login was mapping the logged in user to random existing profiles so, if confirmed, a critical bug.

@reetp
Copy link

reetp commented Jun 6, 2019

I believe the SAML issue is fixed with #14686 but you'd need to build your own to get it right now.

@phasenohr
Copy link
Author

It has been integrated in the 1.1.1 and works just fine (both SAML and the file download). Thanks a lot for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Closed as Duplicate
Projects
None yet
Development

No branches or pull requests

4 participants