I apologize if this question seems really familiar. I have multiple places where I am using forms to send data to server. Here is the html.
<form action="/dashboard/inventory/" method="post" enctype="multipart/form-data">
<input type="date" class="form-control" id="receivingdate" placeholder="Select Receiving Date" required />
<input type="file" class="custom-file-input" id="workorderfile" required />
<button type="submit" class="btn btn-primary">
Submit
</button>
</form>
In my app.js I have
app.use(fileUpload());
app.use(bodyParser.urlencoded({
extended: true}));
app.use(bodyParser.json());
Yet When I try to access the date with req.body I get an empty object and null for req.files
I have used this process on multiple places yet this is the only form that is giving me a headache.
Any Suggestions?