diff --git a/src/main.rs b/src/main.rs index c4d753f..43a962f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use axum::{ }; use log::info; use sqlx::postgres::PgPoolOptions; -use std::sync::Arc; +use std::{fs, sync::Arc}; use tokio::signal; use tower_http::services::ServeDir; @@ -20,6 +20,9 @@ mod web; async fn main() { env_logger::init(); + let images_dir = CONFIG.uploads_dir.join("images"); + fs::create_dir_all(images_dir).unwrap(); + let pool = PgPoolOptions::new() .max_connections(CONFIG.database.max_connections) .connect(&CONFIG.database.url)