I want to send a file as image or pdf. While I am using Postman, I make POST method and body type is form-data. Liike this screenshot:
. But I can't receive any body in Express. My Node.js code is like:
And output is like that:
I tried multer and multipart libraries, but it doesn't work. How can I solve this problem?
Have you by any chance tried using Body-Parser? It could resolve an issue you may have, if that still does not work. You could try looking at Multer Docs, I hope this helps!