anacronw / multer-s3

multer storage engine for amazon s3
MIT License
660 stars 190 forks source link

Capitalized Content-Type header do not work? #133

Closed mathoglu closed 4 years ago

mathoglu commented 4 years ago

Hey all,

First of all awesome project, thx everybody for making this happen.

after some debugging into why the middleware do not work for me, I found out that the type-is library is used to check that the request is valid before continuing. However, it includes a check whether or not the req.headers contains 'content-type' and after playing around a bit, this will make the multer middleware fail in case the header key is 'Content-Type'.

Am a bit confused and this might well be something obvious, but scrolling true the code I can't see any normalizer or similar fixing this? Reading through the documentation/issues I see some mention of using capitalized headers and cannot find any relevant info about this. So, is this and issue with the source-code or am I missing anything here?

Thx