title: How to append an image from URL to a FormData - Javascript
body: <p>This is my little javascript code:</p>
  
  <pre><code>&lt;script&gt;
  
  var formData = new FormData();
  
  URL = "view.php?fetchImageById=1";
  
  formData.append("imageFile", ....);
  
  formData.append("author","user");
  formData.append("description","image");
  
  x=new XMLHttpRequest();
  x.open("POST","upload.php",true);
  x.setRequestHeader("Content-type", "multipart/form-data");
  x.setRequestHeader("Content-Length",formData.length);
  x.send(formData);
  &lt;/script&gt;
  </code></pre>
  
  <p>I don't know how to append the URL to the formData.</p>