Fix typo in multipart stream size limit calculations

This commit is contained in:
puh 2021-02-13 21:50:17 +03:00
parent ad03dff728
commit f77b34356e
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ categories = ["network-programming", "asynchronous"]
[dependencies]
async-graphql = { path = "../..", version = "=2.5.3" }
rocket = { git = "https://github.com/SergioBenitez/Rocket/", rev = "48fd83a", default-features = false } # TODO: Change to Cargo crate when Rocket 0.5.0 is released
rocket = { git = "https://github.com/SergioBenitez/Rocket", rev = "48fd83a", default-features = false } # TODO: Change to Cargo crate when Rocket 0.5.0 is released
serde = "1.0.117"
serde_json = "1.0.59"
tokio-util = { version = "0.6.1", default-features = false, features = ["compat"] }

View File

@ -50,7 +50,7 @@ pub(super) async fn receive_batch_multipart(
Constraints::new().size_limit({
let mut limit = SizeLimit::new();
if let (Some(max_file_size), Some(max_num_files)) =
(opts.max_file_size, opts.max_file_size)
(opts.max_file_size, opts.max_num_files)
{
limit = limit.whole_stream((max_file_size * max_num_files) as u64);
}