Receipt DownLoad Feature Not Working on Community Hosting

Subject: Download Receipt Button Missing on Streamlit Community Cloud Deployment

Body:

Hello Streamlit Community,

I have developed a Streamlit app that includes a receipt download feature for each transaction made.

  • When I run the app locally, the “Download Receipt” button works perfectly — it appears as expected and the PDF downloads without any issue. (See attached local screenshot.)

  • However, on the Streamlit Community Cloud hosted version, the download receipt button does not appear at all for the same transactions. (See attached hosted screenshot.)

Here’s what I’ve already checked:

  1. All changes have been pushed to GitHub.
  2. The correct branch is referenced in the deployment.
  3. No error is thrown in the app logs regarding the button.

I’m wondering:

  • Are there any Streamlit features (like certain file downloads) that do not work on Community Cloud hosting?
  • Could there be environment or permissions-related differences between local and cloud deployments causing this?

Environment:

Any help in identifying where the issue might be would be greatly appreciated.

Thank you!


@mathcatsand Please assist

It looks like you have a conditional on your Download button that you don’t have on the other buttons, so you’ll need to walk back through your code’s logic to isolate where the data isn’t coming through. From a quick glance you have a fallback of returning empty bytes for your receipt pdf, which evaluates to False. I suspect you need to diagnose your connection you use to generate your pdf, but I’m only guessing.

Try to isolate your problem into a minimal snippet of executable code that shows only the part that isn’t working as expected.