From deb57d26ccc913f27e852bfba9d966438b6df0e2 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Tue, 8 Aug 2023 21:32:27 +0300 Subject: [PATCH] recursive mkdir for uploads directory --- src/serverconfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serverconfig.ts b/src/serverconfig.ts index e7d00d3..d665f04 100644 --- a/src/serverconfig.ts +++ b/src/serverconfig.ts @@ -41,7 +41,7 @@ export const attachmentUploadDirectory = path.resolve(process.env.ATTACHMENT_UPL const ensureDirectory = (dir: string) => { const stats = statSync(dir, { throwIfNoEntry: false }); if (!stats) { - mkdirSync(dir, { mode: uploadsDirectoryMode }); + mkdirSync(dir, { mode: uploadsDirectoryMode, recursive: true }); return; } if (!stats.isDirectory()) {