summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-07-18 19:51:19 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-07-18 19:51:19 +0200
commit1754557af46f8b24a7277fb1e5fe77a75cb6688b (patch)
tree0a6443afd0930cba452d4fec8044447034b3baff /src
parent:arrow_up: update lambert-server (diff)
downloadserver-1754557af46f8b24a7277fb1e5fe77a75cb6688b.tar.xz
fix attachment
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;