I can't seem to get multer to work no matter what I do; I've read everything I could find on the matter, and as far as examples go--I've followed them to the best of my ability.
Here is a JSFiddle link to my work.
I can never seem to get the file to upload, despite it actually uploading. In my code, I have
app.post('/submit', function(req, res) {
console.log("____ Clicked submit ____");
console.log(req.body);
console.dir(req.files);
});
The req.body.attachment
will show the filename I attached. However, req.files
returns undefined
.
I appreciate any and all help.