Javascript Upload Image [closed]

After about two weeks reading you, I am at the end of upploding. Acutally I can do

  1. display and delete images before sending to the server
  2. send and backup image to server
  3. animate progress bar

Probleme: I use a formData which is association of the image name and blob
which I use in ajax succes`

 for (var pair of blobs.entries())
{
   if( pair[0] == img ) // image name is id of my ImgDiv
   {
      console.log("Find it : " + img);
      document.getElementById(img).remove("ImgDiv");
      DisplayOff(img);
   }
 }

`
Why this code juste liberate the last image

thanks