mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-22 03:51:33 +00:00
docs: update external docs (#1900)
Co-authored-by: Create or Update Pull Request Action <create-or-update-pull-request@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ddcd1a62c0
commit
22d36414a3
@@ -56,8 +56,8 @@ app.post('/photos/upload', upload.array('photos', 12), function (req, res, next)
|
||||
// req.body will contain the text fields, if there were any
|
||||
})
|
||||
|
||||
const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
|
||||
app.post('/cool-profile', cpUpload, function (req, res, next) {
|
||||
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
|
||||
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
|
||||
// req.files is an object (String -> Array) where fieldname is the key, and the value is array of files
|
||||
//
|
||||
// e.g.
|
||||
|
||||
Reference in New Issue
Block a user