From 739bf5e370ce0b7a323adf7575fbda32d87ef3b5 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 cd94914..f25d30c 100644 --- a/filed/src/web/forms.rs +++ b/filed/src/web/forms.rs @@ -307,7 +307,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(