diff --git a/back/.eslintrc.json b/back/.eslintrc.json index 3aab37d9..0b5e39da 100644 --- a/back/.eslintrc.json +++ b/back/.eslintrc.json @@ -25,6 +25,7 @@ ], "rules": { "no-unused-vars": "off", + "@typescript-eslint/no-floating-promises": "error", "@typescript-eslint/no-explicit-any": "error" } } diff --git a/back/src/Server/server/formdata.ts b/back/src/Server/server/formdata.ts index 66e51db4..0e17de78 100644 --- a/back/src/Server/server/formdata.ts +++ b/back/src/Server/server/formdata.ts @@ -47,7 +47,10 @@ function formData( if (typeof options.tmpDir === "string") { if (typeof options.filename === "function") filename = options.filename(filename); const fileToSave = join(options.tmpDir, filename); - mkdirp(dirname(fileToSave)); + mkdirp(dirname(fileToSave)).then( + () => {}, + () => {} + ); file.pipe(createWriteStream(fileToSave)); value.filePath = fileToSave;