Download File without clicking button


I have created a script that generates a file and can be download by clicking a link/button. Please see screenshot below:

Now, what I want is to do is download the file without clicking the link. Any ideas how I can achieve that?


Try something like below once the link is generated. It should download the file.“file_url”, “_blank”)