Skip to content
Snippets Groups Projects
Commit 773b1973 authored by Travis Ralston's avatar Travis Ralston
Browse files

Update for MSC2702

parent 77ec2354
No related branches found
No related tags found
No related merge requests found
......@@ -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",
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment