From 4c3e5d3324bae0416e359db5d14d2f7f60f64378 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 22 Apr 2019 22:12:43 +0200 Subject: [PATCH] Update create_media_content to r0.4.0 --- src/r0/media/create_content.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/r0/media/create_content.rs b/src/r0/media/create_content.rs index 0ee953de..c6ccc779 100644 --- a/src/r0/media/create_content.rs +++ b/src/r0/media/create_content.rs @@ -1,4 +1,4 @@ -//! [POST /_matrix/media/r0/upload](https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-media-r0-upload) +//! [POST /_matrix/media/r0/upload](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-media-r0-upload) use ruma_api_macros::ruma_api; use serde::{Deserialize, Serialize}; @@ -9,11 +9,15 @@ ruma_api! { method: POST, name: "create_media_content", path: "/_matrix/media/r0/upload", - rate_limited: false, - requires_authentication: false, + rate_limited: true, + requires_authentication: true, } request { + /// The name of the file being uploaded. + #[serde(skip_serializing_if = "Option::is_none")] + #[ruma_api(query)] + pub filename: Option, /// The content type of the file being uploaded. #[ruma_api(header = "CONTENT_TYPE")] pub content_type: String,