summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/routes/attachments.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/routes/attachments.ts b/src/routes/attachments.ts

index acc7604d..9d43a921 100644 --- a/src/routes/attachments.ts +++ b/src/routes/attachments.ts
@@ -11,6 +11,7 @@ const router = Router(); router.post("/:channel_id", multer.single("file"), async (req: Request, res: Response) => { if (req.headers.signature !== Config.get().security.requestSignature) throw new HTTPError("Invalid request signature"); + if (!req.file) return; const { buffer, mimetype, size, originalname, fieldname } = req.file; const { channel_id } = req.params;