0

what I mean is that , I'm passing multiple instance of same form to the server and I want to upload only image fields which are of image datatype ,here lets say i wanna get the questions.image field `

{
     test_name: 'test68',
     total_marks: 21,
     test_duration: 1,
     test_pin: 1,
     number_of_questions: 3,
     allow_multiple_attempts: false,
     createdBy: new ObjectId("6483318673f010ac3acd722d"),
         questions: [
         {
             title: 'C:\\fakepath\\Screenshot (2).png',
             a: 'dxgcfhgv',
             b: 'chgv',
             c: 'ghvjh',
             d: 'chgv',
             correct: 1,
             datatype: 'image',
             image :'',
             _id: new ObjectId("649a81b893b5b08c2d64cbdf")
         },
         {
             title: 'C:\\fakepath\\Screenshot (2).png',
             a: 'dxgcfhgv',
             b: 'chgv',
             c: 'ghvjh',
             d: 'chgv',
             correct: 1,
             datatype: 'image',
             image :'',
             _id: new ObjectId("649a81b893b5b08c2d64cbdf")
         },
         {
             title: 'C:\\fakepath\\Screenshot (2).png',
             a: 'dxgcfhgv',
             b: 'chgv',
             c: 'ghvjh',
             d: 'chgv',
             correct: 1,
             datatype: 'image',
             image :'',
             _id: new ObjectId("649a81b893b5b08c2d64cbdf")
         },

    
                ],
  
}

im just stuck here im new to this, my first project actually.

LIKO
  • 1
  • 1
    Does this answer your question? [Uploading multiple files with Multer](https://stackoverflow.com/questions/39350040/uploading-multiple-files-with-multer) – Ali Navidi Jun 27 '23 at 11:23

0 Answers0