Hi I'm trying send mp3 ( which I'm getting via html input type=file ) from frontend to backend with ajax post request. And I have no idea how access this file and where is this file. When i console log request it has many properties but I don't know which one is actual file.
Asked
Active
Viewed 55 times
2
-
1You should have a `req.files` object with all data you need. Of course you need `app.use(express.bodyParser());` to parse body of requests, but this is valid for every POST/PUT/PATCH request you have – rpadovani Jul 09 '16 at 11:13
-
http://stackoverflow.com/questions/23114374/file-uploading-with-express-4-0-req-files-undefined – Chris Satchell Jul 09 '16 at 11:32
-
Use `formibable` npm module. Please take a look at https://github.com/felixge/node-formidable – Ebrahim Pasbani Jul 09 '16 at 11:45
-
if you are using express you could you express-formidable too. https://www.npmjs.com/package/express-formidable – Jain Jul 09 '16 at 12:43