-
-
Save uno-de-piera/c1441e96fc8c39413c658173971016a3 to your computer and use it in GitHub Desktop.
This file contains 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 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