mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-08 15:33:09 -06:00
mediaapi/writers/upload: Add note about Content-Disposition override
This commit is contained in:
parent
3cea54db0b
commit
8f7ce9adc0
|
|
@ -123,6 +123,8 @@ func parseAndValidateRequest(req *http.Request, cfg *config.MediaAPI) (*uploadRe
|
||||||
return nil, resErr
|
return nil, resErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: do we want to always override ContentDisposition here or only if
|
||||||
|
// there is no Content-Disposition header set?
|
||||||
if len(r.MediaMetadata.UploadName) > 0 {
|
if len(r.MediaMetadata.UploadName) > 0 {
|
||||||
r.MediaMetadata.ContentDisposition = types.ContentDisposition(
|
r.MediaMetadata.ContentDisposition = types.ContentDisposition(
|
||||||
"inline; filename*=utf-8''" + url.PathEscape(string(r.MediaMetadata.UploadName)),
|
"inline; filename*=utf-8''" + url.PathEscape(string(r.MediaMetadata.UploadName)),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue