How to use onDownload feature


#1

Hi to all :slight_smile:, I’d like to use the great feature onDownload, but I really don’t care how to get it working properly. I’m following the official guide at https://a9t9.com/kantu/docs#ondownload. What I need is exactly described in the doc, precisely:

“[…] It allows you to overwrite the default file name with a custom name […]”

Here’s my code for the download part:

{
  "Command": "onDownload",
  "Target": "example.xls",
  "Value": "true"
}

In my browser (Chrome 71), I’ve UNchecked the option “ask where to save each file before downloading”, so the files are downloaded automatically. Is it correct that?

In my script, the script clicks (with simple command “click”) on a button and then wait for some seconds, then the download starts. With the code I’ve posted, the name of the file doesn’t change.

Anyone could help me please?

Many thanks & Best regards,
Chris.


#2

Is this the same issue as here? [Reproducer Required] onDownload: Using, and an error


#4

Hi ulrich, thanks for your reply. No, is not the same issue. Here I’m asking really how to use the “onDownload” feature… I don’t care how to use it and how it works properly…

The browser must download the files automatically or ask where to place it? Is there any command to insert before/after the “onDownload” command? Are right the code lines I’ve posted?

Many thanks :slight_smile: