element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

riot-web desktop app does not offer to download files

Open Demi-Marie opened this issue 5 years ago • 13 comments

Description

If I get a file with an unknown extension, riot-web does not offer to download the file

Steps to reproduce

  • Attach a file with an extension riot-web does not know about
  • Try to open it on the receiving end.

The file should be downloaded, but it is not.

Logs being sent: no

Version information

  • Platform: Desktop

For the desktop app:

  • OS: A fairly minimal installation of Debian Linux
  • Version: 1.5.9

Demi-Marie avatar Feb 18 '20 02:02 Demi-Marie

Per https://github.com/vector-im/riot-web/issues/12602#issuecomment-595599316 I'm reopening this so we can give it more thought. The download attribute won't work for us because of the Content-Disposition header returning inline.

turt2live avatar Mar 06 '20 04:03 turt2live

This actually works for me @turt2live.

Demi-Marie avatar Mar 09 '20 21:03 Demi-Marie

That might be your media repo then, or possibly some OS setting. This is still very much not working.

turt2live avatar Mar 09 '20 22:03 turt2live

Same for me, in files like csv or xls. I get a browser tab instead of the download from Riot-desktop. And In the browser tab I can't download/see the file because of a policy error: Refused to load 'about:blank' (MIME type 'text/csv') because it violates the following Content Security Policy Directive: 'plugin-types application/pdf'.

Maybe there's a way to return everything with Content-Type: application/octet-stream directly?

My riot client is running in archlinux:

  • riot-desktop 1.5.15-1
  • riot-web 1.5.15-1 The Homeserver is V1.12.3

Edit: this only happens in chrome (v 81) in firefox I get the file downloaded :man_shrugging:

Cheers

Shelvak avatar May 07 '20 15:05 Shelvak

image

Clicking on Download just opens it in a new tab / browser.

Element 1.7.5 desktop or web in FF 80.0.1 Debian sid.

532910 avatar Sep 08 '20 11:09 532910

@turt2live @532910 @Shelvak I suspect that the difference is encryption. In an encrypted chat, Element Desktop must download the file itself, since no other program knows how to decrypt it. That’s consistent with the save dialog referencing a blob: URL.

Demi-Marie avatar Sep 10 '20 20:09 Demi-Marie

indeed - this issue is about unencrypted media, though apparently that's never been mentioned.

turt2live avatar Sep 10 '20 20:09 turt2live

Yeah the encrypted media works like expected. The problem is with the non-encrypted channels/files. I can check now that it still happening in Chrome Versión 85.0.4183.83 && element-web-1.7.4-1 element-desktop-1.7.4-1 (On archlinux)

Shelvak avatar Sep 10 '20 21:09 Shelvak

This still doesn-t seem to work. I've just got send a xlsx. When I try to download it on the Linux Desktop App, just nothing happens. On the android app, it doesn't offer me to download it, only to open it with an other application. But when I do that, the other application can-t find the file as it seems (And I want to download it anyway!) Mimetype would be "mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

yennor avatar Mar 16 '22 15:03 yennor

Someone sent me two PDF files (separately). I tried clicking all over the messages and nothing worked. The only thing that had any effect was clicking the download button in the tool bar that appears on hover, and this only responded to input the first time it was clicked per message. The down arrow changed to some other icon for a brief moment and then went back to being a down arrow. I could not see what the intermediary icon was but I assume it was trying to download the file. I searched my home directory exhaustively for the file names but found no matches. No likely files in /tmp either.

I asked the same person to send me an image file. They sent me an image/png. The image displayed inline but clicking the download button had no effect and, again, I could not find the file in any sensible download location.

Element version: 1.9.8 Olm version: 3.2.8 Linux version: 5.10.76 No desktop environment, i3 as window manager.

Hope this helps.

Penguin-Guru avatar Mar 29 '22 19:03 Penguin-Guru

Wrongly closed due to action misconfiguration

t3chguy avatar Feb 24 '25 10:02 t3chguy

it is still not possible to download files on the desktop. Neither PDF, nor Image, nor anything else. So I though let's try it differently. On the right side is the files menu, which shows all the files of a channel. I tried to click download there,, and the only thing that happens is, that instead of the button it shows half a html-tag fragment. See screenshot.

Image

yennor avatar Apr 11 '25 14:04 yennor

Since it is only loosely related, I've opened an other bug report for the sidebar problem: https://github.com/element-hq/element-desktop/issues/2252

yennor avatar Apr 11 '25 14:04 yennor