fix attachment

This commit is contained in:
Flam3rboy
2021-07-18 19:51:19 +02:00
parent 4d7ce61ce5
commit 1754557af4
3 changed files with 50 additions and 1651 deletions
+1
View File
@@ -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;