Stop page from reloading after using downloader

Hi,

In my app a user uploads a file which is processed, the results of which are offered as a download.

Now when I press the download button on my webpage, it reloads and starts processing the uploaded file again. From what I gather this is the intended behaviour of Streamlit? Can I prevent this reloading somehow, though? Seems like caching is an option, but that requires decorating a function? And I’m not really sure it would really solve my problem anyway.

Basically what I want is the user to be able to upload a file and having to option to download the results of the processing. If the user then wants to upload a new file, do the processing on the new file and offer the results as a new download.

2 Likes

Hi Chiel, I ran into similar issue. Every time I click the download button, the whole app will refresh. May I know how you fixed it? Thanks!