title: Content-Disposition headers to allow both download and open file
body: <p>I have some files that I want people to be able to download or view in their browser as they wish.
  I cannot figure out how to do this simply, setting headers in the host or doing some javascript magic.</p>
  
  <p>The end result should be an html page with 2 links per file listed, one to open in a new tab, one to download the file. I can get one, or the other but not both to work at the same time.</p>
  
  <p>I tried both Content-Disposition options, and they both work but not concurrently.
  I tried the chrome.downloads api but it is not available in normal html script.
  I tried <a href="https://stackoverflow.com/a/52427593/11870605">this</a> but it download a text file with the link itself in it, rather than the file content.
  The download attribute is ignored in favour of the Content-Disposition headers, and default to inline, so even not setting it force open and does not allow download.</p>
  
  <pre class="lang-html prettyprint-override"><code>Content-Disposition: inline
  Content-Disposition: attachment
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;a href="test.txt" download="text.txt" target="_blank"&gt;
  </code></pre>
  
  <p>Can anyone spot what I am doing wrong?</p>