Multer - Upload Files form child object
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 21
Description
I have a User object in my application, where each user Object has a Nominee as a child object With a **File** field name `photo`.
### JSON Object
```javascript
{
name: 'Jhon Doe',
phone: '01548761645',
email: 'jhon@email.com',
photo: File(),
nominee: {
name: 'Nominee name',
phone: '9876546542',
photo: File()
}
}
```
### In Express
```javascript
app.post(upload.fields([{name:'photo'}, {name:'nominee'}]), function(req, res) {
res.send(req.files['photo']); // send file details
res.send(req.files['nominee']); // did not show any file details
}
```
In my express code i can access all file details for `Parent` Object but it did not show any details for child(nominee) Object. Is there anything wrong in my code or `multer` did not support nested child field..?
Contributor guide
Assessment
This issue has not been assessed yet.