From 1cf42d459f3f3b3a619392b17d62c8929557bca4 Mon Sep 17 00:00:00 2001 From: Thiago Bustamante Date: Tue, 26 Jul 2016 10:50:55 -0300 Subject: [PATCH] request.files property is not correctly mapped. As is documented on multer project (https://github.com/expressjs/multer): // req.files is an object (String -> Array) where fieldname is the key, and the value is array of files // // e.g. // req.files['avatar'][0] -> File // req.files['gallery'] -> Array // // req.body will contain the text fields, if there were any --- multer/multer.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multer/multer.d.ts b/multer/multer.d.ts index 8bb3c263d3..4b70555af8 100644 --- a/multer/multer.d.ts +++ b/multer/multer.d.ts @@ -9,7 +9,7 @@ declare namespace Express { export interface Request { file: Multer.File; files: { - [fieldname: string]: Multer.File + [fieldname: string]: Multer.File[] }; }