How to download a file in an iframe?

I have a webapp which allows for downloading a file and at the same time is geolocalizing the browser’s ip and writing it into a database.
the webapp is starting fine in the iframe, but the download silently fails. When I run the webapp outside of the iframe, then the download works fine.

I could simply add a link to the file on my homepage, but then I can’t track the downloads. How would you do this?

How do you start the download ?

With ShowURL(url,False)

Are there any error messages in the Browser’s developer tools / console?

I just quickly tried with both ShowURL and a link, both work as expected. Is there anything special about the iframe ? Is it on the same domain ?

It is about midnight here, I’ll continue to check tomorrow morning. Thanks for your suggestions!