title: Drop zone jquery passing List of objecf to spring rest service
body: <p>I am working on DropZone Functionality . I am trying to send Array of Domain Object with Dropzone. Can any one Guide me what will be correct way to do it.
  Creating object in java SCript :</p>
  <pre><code>function getFormData(formData){
      if(!formData){
          formData = new FormData();
      }
      var dataArray= [];
      $(&quot;form&quot;).find(&quot;row dz-preview dz-file-preview form-group dz-processing dz-success dz-complete&quot;).each(function(){       
           var data= {};
           data.descrip = $(&quot;#description&quot;).val();
           data.agendaSeqNum=$(&quot;#number&quot;).val();
           data.materialName= $(&quot;#name&quot;).val();
           dataArray.push(data);
   
         });
       formData.append('dataObj', JSON.stringify(dataArray))
       return formData;
      }
  </code></pre>
  <p>On sending Event :</p>
  <pre><code>myDropZone.on(&quot;sendingmultiple&quot;, function(data, xhr, formData) {
                    getFormData(formData);
  
            });
  </code></pre>
  <p>Back End Spring :</p>
  <pre><code>@PostMapping(value = &quot;/saveData&quot;)
  @ResponseBody
  public Integer saveData(HttpServletResponse response, MultipartHttpServletRequest multipartHttpServletRequest,
          List&lt;DataObj&gt; dataObjects, Errors errors)
          throws RestException {
      try {
          System.out.println(&quot; num::&quot; + dataObjects.get(0).getNumber());
          System.out.println(&quot;File Map::&quot; + multipartHttpServletRequest.getFileMap());
          Map&lt;String, MultipartFile&gt; fileMap = multipartHttpServletRequest.getFileMap();
          for (MultipartFile file : fileMap.values()) {
  
              System.out.println(file.getOriginalFilename());
  
          }
  
      }catch(Exception e) {
          LOGGER.error(&quot;Exception in  save() for num:&quot; + meetingMaterial.getAgendaSeqNum(), e);
          sendInternalServerError(response);
      }
      return 1;
  }
  </code></pre>
  <p>can any one please Guide me how to send List of Objects in this scenerio ?
  Jordan</p>