Created
July 25, 2012 21:16
-
-
Save patcito/3178715 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // html code: | |
| <form method='post' action='/files' enctype="multipart/form-data"> | |
| <input type='file' name='files' multiple> | |
| <input type='submit' name='upload'> | |
| </form> | |
| // node code: | |
| app.post('/files', function(req, res, next){ | |
| if(req.files){ | |
| user_file.save(function(err){ | |
| console.log(user_file) | |
| }); | |
| } else { | |
| next(); | |
| } | |
| req.on('complete', function(err, fields, files){ | |
| console.log('done') | |
| }) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment