Handling nested formdata objects with Multer,express js

68
January 26, 2020, at 6:10 PM

Multer works fine when the form data received is not nested.

For example: When the form data received is photos:somePhotos and the field is defined as: { name: "photos", maxCount: 1 }

However, the problem now is that the client sends the photos inside a nested object using formData i.e user[photos[0][photo]], where photos should be the array of files required.

So is it possible to do this using Multer?

READ ALSO
Convert Array to Object with special case

Convert Array to Object with special case

how can i turn this array to an object like below

44
Exact nature of express.js “next()” parameter

Exact nature of express.js “next()” parameter

I am very new to expressjs and am reading through the documentation

73
Inconsistent DialogFlow Agent's resposne for Voximplant connector

Inconsistent DialogFlow Agent's resposne for Voximplant connector

I am trying to develop an artificial bot that will receive the questions or queries from voximplant live call sessionI am following this link integrate my agent with voximplant account Everything is good

74
Unit Test: Stub/rewire a function inside a server request

Unit Test: Stub/rewire a function inside a server request

I want to test a route that makes external api callsI would like to stub the functionThatShouldBeStubbed so I can skip the external api call and focus on testing the route instead

69