I waste a lot of time to resolve this problem, I have tried to use html form element post data, and use FormData object post data. But it stile undefined in my req.body
shotcut for my http request:

my server code:

and server log:

Besides, .single(fieldname), Are this 'fieldname' is the formdata file key?
Hmm, the only thing I can think of is that something else is consuming the body before multer. Do you have any other middlewares that runs before this route?
@LinusU I have the same issue and I have removed all middlewares to test it and still fails.
Interesting, would you mind posting similar data as @jyjin did? I think it could help me debug the issue 😃
I ve got the point,my problem made by I have a redirect server which didnt handle the request. so when a post a request , it lose the data on the middle redirect server. Now I pipe the request or temp save and resend formdata to final server,it worked!
Glad to hear that you solved it!
@juanmav if you still have a problem and can share some more data I'll reopen this 👌
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
Most helpful comment
I ve got the point,my problem made by I have a redirect server which didnt handle the request. so when a post a request , it lose the data on the middle redirect server. Now I pipe the request or temp save and resend formdata to final server,it worked!