Open NikhilMandaliya opened 7 months ago
const file = req.file as Express.MulterS3.File;
const profileImage = file?.key;
This works
But type of req.file if Express.Request.file?: Express.Multer.File | undefined
Shouldn't it be Express.Request.file?: Express.MulterS3.File | undefined
??
I have stumbled upon the same issue using multer@1.4.5-lts.1
, which is the latest at the time of this writing.
This code block, throws this TS error
Log of req.file if working fine