beginner, please be patient.... i have a file dropzone and when a file is dropped it is buffered in memory by multer to read metadata and then prefill a form in a modal. This so far works as expected except that the Modal that is opened up has a file input and i try to attach the file from dropzone to this input/form but never got it working. How is it possible to pass the file to the form of the modal?
I tried like: $('#Bild').val(response.bild); without success...
This is the api/filemeta (shortened, just to give idea):
response = {
    datum: createDate,
    uhrzeit: createTime,
    gewaesser: wtr,
    bild: req.file,
}
res.send(response);
This is the dropzone:
$("#uploadfile").click(function() {
  $("#file").click();
});
$("#file").change(function() {
  var fd = new FormData();
  var files = $('#file')[0].files[0];
  fd.append('file', files);
  $.ajax({
    type: "POST",
    url: '/api/filemeta',
    data: fd,
    processData: false,
    contentType: false,
    success: function(response) {
      //alert(response);
      $('#id_datum').val(response.datum);
      $('#id_uhrzeit').val(response.uhrzeit);
      $('#id_gewaesser').val(response.gewaesser);
      $("#addNew").modal('show');
    }
  });
});
This is the Modal (shortened):
<div class="modal fade" id="addNew" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <form id="faenge-data" method="post" enctype="multipart/form-data">
    <input id="id_picture" type="file" name="Bild" accept="image/*" multiple="multiple" />
  </form>
</div>
<div class="modal-footer">
  <button type="submit" class="menuebuttons">Speichern</button>
  <button type="button" class="cancelbtn" data-dismiss="modal" aria-label="Close">Abbrechen</button>
</div>
 
     
    