Hi,
is there a way to download a file without using the download button? I have a button, that, if clicked, runs some different commands and one of them is downloading a file. So I’m using a st.button, I can’t use a st.download_button because I must perform different tasks at once.
I use streamlit to create web application. In addition task I need to recieve PDF file via SOAP connection and download it throw browser. Here the function in pure JavaScript to download file without nature download streamlit button (which here unneccesary unfortutanelly)
here b64 is bynary PDF file encrypted using base64 algoritm (type - string). download_filename - string file name to download. Dont foget import follow vibraries:
import streamlit.components.v1 as components and import uuid