Skip to content

Instantly share code, notes, and snippets.

@lerouxb
Created August 15, 2013 14:55
Show Gist options
  • Select an option

  • Save lerouxb/6241490 to your computer and use it in GitHub Desktop.

Select an option

Save lerouxb/6241490 to your computer and use it in GitHub Desktop.
Fill up the temp file system with trollfaces.
#!/bin/bash
while :
do
echo "Press [CTRL+C] to stop.."
curl -i -F image=@trollface.png http://127.0.0.1:3000/
done
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