I want to be able to download a given file when pressing a button.The file will be provided via an API call.For now, I will have it in my local storage. So my f
API
You can provide the link to this function to download the file :
function downloadURI(uri, name) { var link = document.createElement("a"); link.download = name; link.href = uri; link.click(); }