Hello everybody!
In the code below, I’m trying to get the user to download either file1, file2, or both.
But when one of the buttons is used, the app reloads and there is no possibility to download the other file.
Is there a workaroud for this requirement?
Thank you so much for your help!
# Download file 1
with open(file1_path, "rb") as file1:
st.download_button(
label="Download File 1",
file_name=f"File1-{date_and_time}.json",
data=file1,
mime="application/json",
)
# Download file 2
with open(file2_path, "rb") as file2:
st.download_button(
label="Download File 2",
file_name=f"File2-{date_and_time}.json",
data=file2,
mime="application/json",
)