Skip to content

Instantly share code, notes, and snippets.

@Fandora
Created December 19, 2011 03:25
Show Gist options
  • Save Fandora/1495246 to your computer and use it in GitHub Desktop.
Save Fandora/1495246 to your computer and use it in GitHub Desktop.
MVC or not-MVC
app.post("/api/upload-picture", function(req, res) {
if(!req.session.signined) {
throw new BadRequest("signin first");
}
if(!req.files.picture) {
throw new BadRequest("illegal file element name");
}
var h = new UploadPictureHandler(req, res);
h.run();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment