How to download a file without the need to click st.download_button

I need to download a file from the server, once it has been created without explicitly showing or asking user to download by clicking the st.download_button. How do I implement this?

Hi @Srk,

Thanks for posting!

There is a security risk associated with automatic downloads and might be a little challenging to find a way around this…if you don’t mind me asking, what is the reason for bypassing the download button?

Thanks Kupkemboi!

In my situation, I am creating a file based on user input. I really want to create locally. If there is a solution for that, that will be best.

But I am able to create a file on the server. So, I don’t want the user to go through the extra step of downloading, as it is not a good user experience.

Thank you for your help.
-Shiv

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.