Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera uno-de-piera/multer.js Secret

Created Jun 5, 2020
What would you like to do?
var express = require('express')
var multer = require('multer')
var upload = multer({ dest: 'uploads/' })
var app = express()'/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
You can’t perform that action at this time.