Improve documentation for content_disposition fields

This commit is contained in:
Jonas Platte 2020-10-21 14:38:32 +02:00
parent 7d10df7177
commit 97f3e31ad8
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
2 changed files with 12 additions and 2 deletions

View File

@ -39,7 +39,12 @@ ruma_api! {
#[ruma_api(header = CONTENT_TYPE)]
pub content_type: Option<String>,
/// The name of the file that was previously uploaded, if set.
/// The value of the `Content-Disposition` HTTP header, possibly containing the name of the
/// file that was previously uploaded.
///
/// See [MDN] for the syntax.
///
/// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#Syntax
#[ruma_api(header = CONTENT_DISPOSITION)]
pub content_disposition: Option<String>,
}

View File

@ -44,7 +44,12 @@ ruma_api! {
// Potentially not actually optional https://github.com/matrix-org/matrix-doc/pull/2818
pub content_type: Option<String>,
/// The name of the file that was previously uploaded, if set.
/// The value of the `Content-Disposition` HTTP header, possibly containing the name of the
/// file that was previously uploaded.
///
/// See [MDN] for the syntax.
///
/// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#Syntax
#[ruma_api(header = CONTENT_DISPOSITION)]
pub content_disposition: Option<String>,
}