title: How to upload file using javascript?
body: <pre><code>&lt;form method="post" action="#" onsubmit="uploadImage"&gt;
      &lt;input type="file" name="imgFile" &gt;
      &lt;input type="submit" id="submit" value="upload"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>How can I upload an image using javascript with ajax call.</p>