riot-web desktop app does not offer to download files
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
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.
This actually works for me @turt2live.
That might be your media repo then, or possibly some OS setting. This is still very much not working.
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

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.
@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.
indeed - this issue is about unencrypted media, though apparently that's never been mentioned.
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)
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"
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.
Wrongly closed due to action misconfiguration
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.
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