From 97f3e31ad81f34f0efc9593976d664bc4ae39d7f Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 21 Oct 2020 14:38:32 +0200 Subject: [PATCH] Improve documentation for content_disposition fields --- ruma-client-api/src/r0/media/get_content.rs | 7 ++++++- ruma-client-api/src/r0/media/get_content_as_filename.rs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ruma-client-api/src/r0/media/get_content.rs b/ruma-client-api/src/r0/media/get_content.rs index 7ab4cccf..9dd84645 100644 --- a/ruma-client-api/src/r0/media/get_content.rs +++ b/ruma-client-api/src/r0/media/get_content.rs @@ -39,7 +39,12 @@ ruma_api! { #[ruma_api(header = CONTENT_TYPE)] pub content_type: Option, - /// 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, } diff --git a/ruma-client-api/src/r0/media/get_content_as_filename.rs b/ruma-client-api/src/r0/media/get_content_as_filename.rs index 51f72a39..854f2344 100644 --- a/ruma-client-api/src/r0/media/get_content_as_filename.rs +++ b/ruma-client-api/src/r0/media/get_content_as_filename.rs @@ -44,7 +44,12 @@ ruma_api! { // Potentially not actually optional – https://github.com/matrix-org/matrix-doc/pull/2818 pub content_type: Option, - /// 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, }