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

pdf viewer not display content in storage type mode webdav #33251

Open
rze0 opened this issue Sep 11, 2024 · 9 comments
Open

pdf viewer not display content in storage type mode webdav #33251

rze0 opened this issue Sep 11, 2024 · 9 comments

Comments

@rze0
Copy link

rze0 commented Sep 11, 2024

Description:

PDF viewer not display content in storage type mode webdav In the browser and in Desktop Clients windows.
If you change the storage type to GridFS, it displays correctly.

Steps to reproduce:

  1. Switch storage type to webdav
  2. upload a file to chat
  3. сlick the file name

Expected behavior:

Display the content in the same way as in storage type GridFS.

Actual behavior:

  1. webdav https://i.imgur.com/QAR3i2K.png browser https://i.imgur.com/BLjncGW.png not work
  2. settings https://i.imgur.com/k1L0it5.png and try https://i.imgur.com/1HXZjTE.png
  3. GridFS https://i.imgur.com/9RcDlM5.png work (switched mode, uploaded a new file, checked.)

Server Setup Information:

  • Version of Rocket.Chat Server: 6.12.0
  • License Type: Community
  • Number of Users: 20-30
  • Operating System: Debian 11
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v14.21.3
  • MongoDB Version: 5.0.26

Client Setup Information

  • Desktop App: 4.0.2
  • Browser Version: Chrome 128.0.6613.121
  • Operating System: W11 Pro 64Bit

Additional context

Relevant logs:

@reetp
Copy link

reetp commented Sep 11, 2024

You should be using a reverse proxy + https on your rocket server - not http/3000.

You should set your webdav up in a similar way. You don't tell us what system you are using. Nextcloud or a.n. other?

Gridfs will work as it is effectively an "internal" link and serving the file correctly.

Likely the webdav url/file is being served incorrectly.

I think this is an issue with your webdav, not rocket.

@rze0
Copy link
Author

rze0 commented Sep 11, 2024

It's a copy of the VM. The original one uses https and nginx. The webdav settings are identical. Synology is used for the webdav server.
But there are no problems with uploading and downloading. Just the pdf preview.
Should I try to switch webdav to https?

@reetp
Copy link

reetp commented Sep 11, 2024

So yoor working version does what is meant to with Rocket and WebDav, correct?

@rze0
Copy link
Author

rze0 commented Sep 11, 2024

Uploading files to chat works. Downloading files from chat work. Pdf viewing does not work. It is displayed as in the screenshots above. https://i.imgur.com/gRKaipb.png

So yoor working version does what is meant to with Rocket and WebDav, correct?

upd. Found a temporary workaround via Storage Type - File system + davfs2. https://i.imgur.com/mIIaUf9.png

@reetp
Copy link

reetp commented Sep 12, 2024

When it fails does it only do it in the client, or both client and browsers?

Your fails above point to the client?

@rze0
Copy link
Author

rze0 commented Sep 13, 2024

When it fails does it only do it in the client, or both client and browsers?

Your fails above point to the client?

Client and browsers, Desktop App: 4.0.2, Browser Version: Chrome 128.0.6613.121.
Screenshots are taken in the desktop client.
I reconfigured the webdav server Synology to https with the correct certificate. But it didn't work. Settings https://i.imgur.com/Ro4L0AK.png

I also brought up TrueNAS and tried to configure through it. webdav http. But that didn't help either.

@reetp
Copy link

reetp commented Sep 13, 2024

Pretty sure that this is a mime type issue and your webdav or web server is not serving up the right file type - it is sending plain text and not application/pdf

Without trying to teach you to suck eggs have you checked your mime type settings? Both in Rocket and in your web server?

A search on the interwebs for something like "nginx mime type" may assist.

Also have you tried testing local file storage as well (using your web proxy - not accessing via localhost:3000)?

@akshayw1
Copy link

Can I work on this issue?

@reetp
Copy link

reetp commented Sep 23, 2024

Can I work on this issue?

First see my earlier response 33331. You do not need to ask, and no one assigns things, but you do need to understand how the organisation works. Best to ask on open.rocket.chat

Second do you even understand the issue? Can you replicate it, because if you can't, how do you know what to fix?

If you read all the comments - which you really must do - you will see more information is required.

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

No branches or pull requests

3 participants