diff --git a/src/main.rs b/src/main.rs index f97f1a8..da8e8fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use axum::{ body::Body, - extract::{Multipart, Query, State}, + extract::{DefaultBodyLimit, Multipart, Query, State}, http::{header, StatusCode}, response::{Html, Json, Response}, routing::{get, post}, @@ -65,6 +65,7 @@ async fn main() { .route("/upload", post(upload)) .route("/download", get(download)) .route("/reset", post(reset_session)) + .layer(DefaultBodyLimit::max(50 * 1024 * 1024)) // 50 MB – phone photos can be large .with_state(state); let addr = "0.0.0.0:3000"; diff --git a/templates/index.html b/templates/index.html index 3b9629f..59d6d57 100644 --- a/templates/index.html +++ b/templates/index.html @@ -158,7 +158,7 @@