Skip to content

Commit

Permalink
refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
Халил Базаев committed Oct 19, 2023
1 parent 4c54040 commit e1ab801
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/protocol/creation/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ pub async fn create_file(
return Ok(HttpResponse::BadRequest().body("Upload-Length header is required"));
}

if state.config.max_file_size.is_some()
&& length.is_some()
&& state.config.max_file_size < length
{
if state.config.max_file_size.is_some() && state.config.max_file_size < length {
return Ok(HttpResponse::BadRequest().body(format!(
"Upload-Length should be less than or equal to {}",
state.config.max_file_size.unwrap()
Expand Down

0 comments on commit e1ab801

Please sign in to comment.