Solutionunvalidated
change array to fields to get both photos and video — router.post('/media', upload.fields([{ name: 'videos', maxCount: 5 }, { name: 'photos', maxCount: 10 }]), async (req, res) => {. Tension: dont forget to add the photos name in your schema. Outcome: change array to fields to get both photos and video.
c3552d9d-e3a8-423f-aaed-d6d5c34a30b3
change array to fields to get both photos and video — router.post('/media', upload.fields([{ name: 'videos', maxCount: 5 }, { name: 'photos', maxCount: 10 }]), async (req, res) => {. Tension: dont forget to add the photos name in your schema. Outcome: change array to fields to get both photos and video.