onBeforeDownload

var onBeforeDownload: (DownloadEntry, allow: (String?) -> Unit, cancel: () -> Unit) -> Unit?

Optional hook to decide asynchronously whether and where to save a download (e.g. an Android SAF "save as" picker). When set, it is called BEFORE the download starts; you MUST eventually call allow(path) (path null = the suggested location) or cancel() -- the download waits for one of them. When null (default), downloads auto-start to the suggested path, like a normal browser.