title: Add an image to formData in Javascript. (Without input type file)
body: <p>I'm Working on a Cordova/Ionic Application and I'm trying to add a picture in a formData. It's working great with an input type.</p>
  
  <p><strong>With Input Type</strong></p>
  
  <pre><code>&lt;input id="photo" type="file" accept="image/*"&gt;   
  
  formData.append('image', $('input[type=file]')[0].files[0]);
  </code></pre>
  
  <p>I've tried without input,but it's not working.... I Really need to make it work in that way.</p>
  
  <p><br/>
  <strong>Without Input Type</strong></p>
  
  <pre><code>&lt;img src="img.png" id="imgID" /&gt;
  
  formData.append('image', $('#imgID')[0].files[0]);
  </code></pre>
  
  <p><br/></p>
  
  <p>Does anyone have an idea? Thanks for reading.</p>