Skip to content

Instantly share code, notes, and snippets.

@WaleedAshraf
Last active March 18, 2018 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WaleedAshraf/c976d0d118332b1eef043e690326ce9f to your computer and use it in GitHub Desktop.
Save WaleedAshraf/c976d0d118332b1eef043e690326ce9f to your computer and use it in GitHub Desktop.
Mock Express Session
exports.create = function(req, res) {
// upload image to s3
var photos = PhotosTable.create(req.files.names); // add entries in database
req.session.count = photos.length; // set count in req.session
res.redirect(`api/image/submit`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment