Upgrade multer to 1.2.0

This commit is contained in:
sunli 2020-05-21 07:43:35 +08:00
parent 808c962c8c
commit 3086681855
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ regex = "1.3.5"
tracing = "0.1.13"
indexmap = "1.3.2"
async-stream = "0.2.1"
multer = "1.0.3"
multer = "1.2.0"
bson = { version = "0.14.1", optional = true }
uuid = { version = "0.8.1", optional = true }
url = { version = "2.1.1", optional = true }

View File

@ -52,10 +52,10 @@ where
if let (Some(max_file_size), Some(max_num_files)) =
(opts.max_file_size, opts.max_file_size)
{
limit = limit.whole_stream(max_file_size * max_num_files);
limit = limit.whole_stream((max_file_size * max_num_files) as u64);
}
if let Some(max_file_size) = opts.max_file_size {
limit = limit.per_field(max_file_size);
limit = limit.per_field(max_file_size as u64);
}
limit
}),