diff --git a/src/main.rs b/src/main.rs index c3c27eb..8c9c5d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -576,6 +576,12 @@ async fn ax_post_file( } } } else if name == "file0" { + if path.is_empty() { + let error_msg = "Missing path field before file0".to_string(); + eprintln!("{}", error_msg); + upload_result = Some((StatusCode::BAD_REQUEST, error_msg.into_bytes())); + break; + } match filename { Some(fname) => { file0_filename = fname.to_string();