Unfortunately not. Actually, I rephrased this question into and opened a new thread: Create + Download file upon clicking a button
There is some more discussion there, but not really any solution.
However, if you check github you’ll find that this issue has been mentioned multiple times in the past few months and there are quite some upvotes. Also a few streamlit devs are involved in the discussion on github. I hope the streamlit team will implement some changes to resolve this issue.