add content_disposition to /thumbnail
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
1c291e18ef
commit
b8f30d4da4
@ -9,7 +9,7 @@ pub mod v3 {
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use http::header::{CACHE_CONTROL, CONTENT_TYPE};
|
||||
use http::header::{CACHE_CONTROL, CONTENT_DISPOSITION, CONTENT_TYPE};
|
||||
use js_int::UInt;
|
||||
use ruma_common::{
|
||||
api::{request, response, Metadata},
|
||||
@ -130,6 +130,15 @@ pub mod v3 {
|
||||
/// [MDN]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#syntax
|
||||
#[ruma_api(header = CACHE_CONTROL)]
|
||||
pub cache_control: Option<String>,
|
||||
|
||||
/// The value of the `Content-Disposition` HTTP header, possibly containing the name of the
|
||||
/// file that was previously uploaded.
|
||||
///
|
||||
/// See [MDN] for the syntax.
|
||||
///
|
||||
/// [MDN]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#Syntax
|
||||
#[ruma_api(header = CONTENT_DISPOSITION)]
|
||||
pub content_disposition: Option<String>,
|
||||
}
|
||||
|
||||
impl Request {
|
||||
@ -174,6 +183,7 @@ pub mod v3 {
|
||||
content_type: None,
|
||||
cross_origin_resource_policy: Some("cross-origin".to_owned()),
|
||||
cache_control: None,
|
||||
content_disposition: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user