title: How to force browser to download file using vue.js?
body: <p>I'd like to let users to download images by clicking on a download icon:</p>
  
  <p>The  image file is already fetched from the server and displayed:</p>
  
  <pre><code>&lt;img  :src="currentMediaUrl"&gt;
  </code></pre>
  
  <p>The button is intended to force the browser to download the image above:</p>
  
  <pre><code> &lt;i @click="downloadMedia(currentMediaUrl)" class="fa fa-download"&gt; &lt;/i&gt; 
  </code></pre>
  
  <p>Here is what I've tried:</p>
  
  <pre><code>downloadMedia(media) {
    let uriContent = "data:application/octet-stream," + encodeURIComponent(media);
    window.open(uriContent, 'neuesDokument');
  
  },
  </code></pre>
  
  <p>But it downloads a file containing the media URI instead of the very file.</p>
  
  <p>How can I fix it?</p>