How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

St.download_button inconsistent behavior in a docker deployment in cloud

calendar_today June 15, 2026 person Sudipta Bhawmik domain streamlit

A user reports st.download_button works on localhost but downloads inconsistently (sometimes a .bin file instead of a PDF) when deployed in a Docker container on DigitalOcean, with the PDF fetched from an NFS server. The recommended fix is to read the file into memory just before rendering the button, open in binary mode, reset BytesIO pointers with seek(0), and avoid relying on disk files in cloud environments.

open_in_new Read original post