From 864dadb37005fc3abdb598267d76532ef3a61019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Fri, 23 Feb 2024 12:25:44 -0800 Subject: [PATCH] fix --- main.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.mjs b/main.mjs index d0dbc6b..c29a6c5 100644 --- a/main.mjs +++ b/main.mjs @@ -20,7 +20,7 @@ const app = express(); const upload = multer({dest: tempDir}); app.post('/convert', upload.single('file'), (req, res) => { - if (!req.file.filename) { + if (!req.file?.filename) { res.status(400); res.send({error: 'No file uploaded'}); return;