Use #[ruma_api(raw_body)] for r0::media::{get,create}_media
This commit is contained in:
parent
246de19790
commit
258fbf5a01
@ -14,7 +14,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
js_int = { version = "0.1.2", features = ["serde"] }
|
||||
ruma-api = "0.12.0"
|
||||
ruma-api = "0.12.1"
|
||||
ruma-events = "0.15.1"
|
||||
ruma-identifiers = "0.14.0"
|
||||
serde = { version = "1.0.103", features = ["derive"] }
|
||||
|
@ -21,7 +21,7 @@ ruma_api! {
|
||||
#[ruma_api(header = CONTENT_TYPE)]
|
||||
pub content_type: String,
|
||||
/// The file contents to upload.
|
||||
#[ruma_api(body)]
|
||||
#[ruma_api(raw_body)]
|
||||
pub file: Vec<u8>,
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ ruma_api! {
|
||||
|
||||
response {
|
||||
/// The content that was previously uploaded.
|
||||
#[ruma_api(body)]
|
||||
#[ruma_api(raw_body)]
|
||||
pub file: Vec<u8>,
|
||||
/// The content type of the file that was previously uploaded.
|
||||
#[ruma_api(header = CONTENT_TYPE)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user