The issue is that, when sending FormData
, the Content-Type
will be multipart/form-data
.
Though you're using express.json()
and express.urlencoded()
, each of them only acts on particular Content-Type
s -- application/json
and application/x-www-form-urlencoded
, respectively.
And Express/Connect will be removing built-in support for multipart()
and parsing of multipart/form-data
content in the future due to security concerns. They instead recommend using:
So, for future support of FormData
and multi-part
in general with Express/Connect, you'll have to use an addition dependency.