expressjs / expressjs/multer

when using upload.fields, it it works when uploading all of the fields but does not when uploading only one of them

Open
#840 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
12.1k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
21

Description

when I try to upload only one of the field, I get this strange error:
'cannot read property 0 of undefined'

here is my code:

1) multer.js
![muler](https://user-images.githubusercontent.com/53225448/74610738-0e5bfe00-511e-11ea-8e22-fb91d1390e1d.PNG)

2) multerConfig,js
![ulrer2](https://user-images.githubusercontent.com/53225448/74610745-17e56600-511e-11ea-86ed-e5dd942c3789.PNG)

3) route,js
![route](https://user-images.githubusercontent.com/53225448/74610749-216ece00-511e-11ea-9bc9-78d7a3dac0d7.PNG)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.