mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
Use UInt instead of u32 for max request size
Sometimes you just really want to upload a full disk image as media.
This commit is contained in:
parent
99924e5779
commit
5616510727
3 changed files with 8 additions and 8 deletions
|
|
@ -10,7 +10,7 @@ use std::{
|
|||
use reqwest::Url;
|
||||
use ruma::{
|
||||
api::federation::discovery::OldVerifyKey, OwnedServerName,
|
||||
OwnedServerSigningKeyId, RoomVersionId,
|
||||
OwnedServerSigningKeyId, RoomVersionId, UInt,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use strum::{Display, EnumIter, IntoEnumIterator};
|
||||
|
|
@ -51,7 +51,7 @@ pub(crate) struct Config {
|
|||
#[serde(default = "default_cleanup_second_interval")]
|
||||
pub(crate) cleanup_second_interval: u32,
|
||||
#[serde(default = "default_max_request_size")]
|
||||
pub(crate) max_request_size: u32,
|
||||
pub(crate) max_request_size: UInt,
|
||||
#[serde(default = "false_fn")]
|
||||
pub(crate) allow_registration: bool,
|
||||
pub(crate) registration_token: Option<String>,
|
||||
|
|
@ -466,9 +466,9 @@ fn default_cleanup_second_interval() -> u32 {
|
|||
60
|
||||
}
|
||||
|
||||
fn default_max_request_size() -> u32 {
|
||||
fn default_max_request_size() -> UInt {
|
||||
// Default to 20 MB
|
||||
20 * 1024 * 1024
|
||||
(20_u32 * 1024 * 1024).into()
|
||||
}
|
||||
|
||||
pub(crate) fn default_tracing_filter() -> EnvFilterClone {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue