Strange Problem Javascript Image Pasting

 


this works,

https://gist.github.com/kidatti/f93feba1ec4be2117d1b


this, also works

https://stackoverflow.com/questions/50427513/html-paste-clipboard-image-to-file-input


but when on click upload i try to get the image from image input file list empty

let imageFile = parent_tr[0].children[2].children[1].files[0]

 

var formData = new FormData();
formData.append("explanation_img", imageFile);
 

 

and also the same code works when selecte browsing image

Comments