So I have an issue where I have a button on my page that has a link to a dmg file however when you press the button it opens the dmg in the browser instead of downloading it.
I have tried using the download attribute but with no success.
My code:
<button id="DownloadByOS" class="btn btn-lg btn-primary btn-block mt-3" onclick="location.href=somerandom.dmg">Download</button>