From 773b1973dbbf3482b719edcca85b2fb3bec852ed Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 5 Sep 2023 15:50:48 -0600 Subject: [PATCH] Update for MSC2702 --- api/r0/download.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/api/r0/download.go b/api/r0/download.go index a948f22a..e645ba7a 100644 --- a/api/r0/download.go +++ b/api/r0/download.go @@ -28,15 +28,6 @@ func DownloadMedia(r *http.Request, rctx rcontext.RequestContext, user _apimeta. return _responses.BadRequest("invalid server ID") } - targetDisposition := r.URL.Query().Get("org.matrix.msc2702.asAttachment") - if targetDisposition == "true" { - targetDisposition = "attachment" - } else if targetDisposition == "false" { - targetDisposition = "inline" - } else { - targetDisposition = "infer" - } - downloadRemote := true if allowRemote != "" { parsedFlag, err := strconv.ParseBool(allowRemote) @@ -98,6 +89,6 @@ func DownloadMedia(r *http.Request, rctx rcontext.RequestContext, user _apimeta. Filename: filename, SizeBytes: media.SizeBytes, Data: stream, - TargetDisposition: targetDisposition, + TargetDisposition: "infer", } }