feat: wire up image processing route replacing ServeDir

This commit is contained in:
xfy 2026-06-08 15:02:18 +08:00
parent 1f009f57c8
commit 7963103f62

View File

@ -50,7 +50,7 @@ fn main() {
axum::routing::post(crate::api::upload::upload_image)
.layer(axum::extract::DefaultBodyLimit::disable()),
)
.nest_service("/uploads", tower_http::services::ServeDir::new("uploads"))
.route("/uploads/{*path}", axum::routing::get(crate::api::image::serve_image))
.serve_dioxus_application(config, router::AppRouter)
.layer(
TraceLayer::new_for_http()