I am trying to make it possible to delete attachments before sending, and then send. Found implementation, but need help. The problem is that if I send attachments as they are, without editing - everything comes as soon as I delete something:

var_dump ($_FILES); 

returns error 4. As I understand it, when I understood - the reason lies in the fact that through js I can get the contents of input type = "files" - it can only be read, respectively, in my implementation a copy of this data is made to the object, and it is supposed to be sent later via FormData . I did not manage to do this, I can not understand where and what to edit, in php or js, and what exactly.

  • show dispatch code - Taarim 1:46
  • @Taarim Here is the specific code for sending jsfiddle.net/ukgro4we Completely code - here: Link - Anton

0