From c2a65b92836bc1874f7da468198ee384f21b3504 Mon Sep 17 00:00:00 2001 From: pociej Date: Thu, 25 Apr 2024 12:56:06 +0200 Subject: [PATCH] fix: mkdir recursively #38 --- backend/src/services/file/routes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/services/file/routes.ts b/backend/src/services/file/routes.ts index d77a46e..0567b34 100644 --- a/backend/src/services/file/routes.ts +++ b/backend/src/services/file/routes.ts @@ -27,7 +27,9 @@ export const fileService = fastifyPlugin( } try { - await mkdir(DIR_NAME); + await mkdir(DIR_NAME, { + recursive: true, + }); } catch (e) { console.log("Error creating directory", e); }