title: Trigger automatic download file based on condition
body: <p>I have created a success page on <code>drupal 8</code> to download a file once redirected. Is there anyway to trigger downloading the file automatically based on a condition</p>
  
  <p>For example if the page has an attribute <code>download</code> <code>&lt;a class="cta download-pdf" download="" href="/downloads/aim-brochure-mib.pdf"&gt;Download Brochure&lt;/a&gt;</code> inside the markup it would automatically download the file based on the address. Was thinking of using jquery/javascript to accomplish this. </p>