From ae90e5474b8dc5ee470597aef0c28f76a0bfff10 Mon Sep 17 00:00:00 2001 From: blek Date: Tue, 12 Dec 2023 16:30:03 +1000 Subject: [PATCH] fix any request being treated as a GUI upload form --- filed/src/web/forms.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filed/src/web/forms.rs b/filed/src/web/forms.rs index cbfcecf..7f22aba 100644 --- a/filed/src/web/forms.rs +++ b/filed/src/web/forms.rs @@ -308,7 +308,8 @@ pub async fn upload(form: FormData, ip: Option, state: SharedState) -> R } pub fn get_routes(state: SharedState) -> impl Filter + Clone { - warp::post() + warp::path("upload") + .and(warp::post()) .and(warp::multipart::form()) .and(real_ip(vec![state.env.proxy_addr])) .and(