1var express = require('express');
2var multiparty = require('connect-multiparty'),
3 multipartyMiddleware = multiparty({ uploadDir: './imagesPath' });
4
5var router = express.Router();
6
7router.post('/', multipartyMiddleware, function(req, res) {
8 console.log(req.body, req.files);
9 var file = req.files.file;
10 console.log(file.name);
11 console.log(file.type);
12 res.status(200).send('OK');
13});
14
15module.exports = router;