Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Media-links now force download instead of just showing content inline in browser #15885

@dennisse

Description

@dennisse

Description

PR #15680 just broke my ability to quickly open and view attachements.

The PR makes the media api to send the header content-disposition: attachment when answering requests for attachements. This again forces the browser to try to download the content, instead of just viewing it directly.

I, and many others, use less fancy clients, like weechat-matrix, and attachements are often just presented as a link to the content. I used to be able to just open the link and view the content directly in my browser. Now I have to download the content first, and then open it.

Anyone getting a link to a matrix-attachement outside of a fancy matrix-client will probably be affected by this. This includes:

  • IRC-users on the other side of a bridge (who I hear already aren't too pleased with matrix these days)
  • Anyone getting a link to content from a matrix-server in general. It's not unheard of to share links to media from a matrix-chat outside matrix.

A way to turn this off, or the mimetype whitelist the PR hints at, would be greatly appreciated.

Steps to reproduce

Homeserver

matrix.dnns.no

Synapse Version

1.87.0

Installation Method

Docker (matrixdotorg/synapse)

Database

PostgreSQL

Workers

Single process

Platform

Podman container on a VM running Debian, on host running OpenBSD

Configuration

No response

Relevant log output

There are no relevant logs here

Anything else that would be useful to know?

Possible workaround until this gets fixed: Strip the Content-Disposition header from the response in your reverse proxy. I.e. proxy_hide_header Content-Disposition; in nginx (this goes in the same place as proxy_pass).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Media-RepositoryUploading, downloading images and video, thumbnailingO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MinorBlocks non-critical functionality, workarounds exist.T-OtherQuestions, user support, anything else.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions