Create uploads if does not exists

This commit is contained in:
2024-12-08 13:29:58 +01:00
parent 7f45db9463
commit a767d70354
2 changed files with 4 additions and 2 deletions

View File

@@ -60,6 +60,10 @@ impl Hooks for App {
}
async fn after_context(ctx: AppContext) -> Result<AppContext> {
// Create uploads directory if it doesn't exist
let _ = std::fs::create_dir("uploads");
let store = storage::drivers::local::new_with_prefix("uploads").map_err(Box::from)?;
Ok(AppContext {