Browse files

add upload form example

  • Loading branch information...
1 parent 2cc2046 commit 57d6b86ed97e00a52ef3acc024ae816ca03c6719 @tih-ra committed Nov 28, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 README.md
View
13 README.md
@@ -48,6 +48,19 @@ Example:
1. **Upload example:**
```javascript
+
+ app.get('/upload_form', function(req, res) {
+ res.writeHead(200, {'content-type': 'text/html'});
+ res.end(
+ '<form action="/upload" 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) {
alleup.upload(req, res, function(err, file, res){

0 comments on commit 57d6b86

Please sign in to comment.