var express = require('express') | |
var multer = require('multer') | |
var upload = multer({ dest: 'uploads/' }) | |
var app = express() | |
app.post('/profile', upload.single('avatar'), function (req, res, next) { | |
// req.file is the `avatar` file | |
// req.body will hold the text fields, if there were any | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment