I'm using the latest version of node and express. I have the the following code in my jade template
.form-group
label.btn.btn-default
| Browse
input.form-control(type='file', name='zipfile', id='zipefile', hidden ='')
which translates to
<div class="form-group">
<label class="btn btn-default">Browse
<input type="file" name="zipfile" id="zipefile" hidden="" class="form-control"/>
</label>
</div>
When I log out the file name
exports.postTranslate = (req, res) => {
console.log("req.body",req.body);
console.log("req.body.zipfile", req.body.zipfile)
res.redirect('/result');
};
I get the name of the file. From here, how do I save the zip file to disk on the server?