I'm using node.js 0.10.22
and express 3.4.6
I would like to send something like this /upload?slides=2
and then get the value for slides
I'm using the bodyParser
middleware.
I have this:
app.get('/',function(req, res) {
// show a file upload form
res.writeHead(200, {'content-type': 'text/html'});
res.end(
'<form action="/upload?slides=2" enctype="multipart/form-data" method="post">'+
'<input type="text" name="title"><br>'+
'<input type="file" name="upload" multiple="multiple"><br>'+
'<input type="submit" value="Upload">'+
'</form>'
);
});
app.post('/upload',function(req,res){
doLog("/upload","hit upload");
//console.log(req);
console.log("params = ");
console.log(req.body);
...
In the console I just get {title: ''}
Or do I have to put the parameters elsewhere in the form?