Fix typo in multipart stream size limit calculations
This commit is contained in:
parent
ad03dff728
commit
f77b34356e
|
@ -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"] }
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user