Download zip file

I also face this problem, and need a good solution.
I tried the solution of like this:

with open(zip_path, β€œrb”) as f:
bytes = f.read()
    b64 = base64.b64encode(bytes).decode()
    href = f'<a href="data:file/zip;base64,{b64}" download=\'{filename}.zip\'>\
        Click to download\
    </a>'
st.sidebar.markdown(href, unsafe_allow_html=True)

this solution will report RuntimeError:Data of size 280MB exceeds write limit of 50MB.

related topic link:

How to download file in streamlit - Using Streamlit - Streamlit