diff --git a/backend/src/main.rs b/backend/src/main.rs index 0051dd2..622285a 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -70,12 +70,13 @@ async fn main() -> Result<()> { }); let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set"); + const BODY_LIMIT: usize = 1000 * 1000 * 1000 * 5; let pool = PgPool::connect(&database_url).await.unwrap(); sqlx::migrate!().run(&pool).await?; let file_repository = FileRepository::new(pool.clone())?; let routes_file = routes_file(file_repository.clone()) .route_layer(middleware::from_fn(mw_require_auth)) - .layer(DefaultBodyLimit::disable()); + .layer(DefaultBodyLimit::max(BODY_LIMIT)); let user_repository = UserRepository::new(pool)?; let routes_auth =