Ask for e-mail before using a certain tool

Hello everybody!

I’m developing a simple application for a colleague, which might reduce the size of a dataframe and reduce size of pictures. I was looking for a way to ask for an e-mail before someone uploads a file (i’m using st.file_uploader) and store it.

Does anyone knows a way to do that?

You might me interested in the SMTP python library

Here is an example of this library. Click on the button “send me a message” on the left side to see the functionality. It’s from a fellow streamlit user:

The code can be found here

All you have to do now is implement it with conditions:

def show_contact_form():

if user send contact form == True:
         def upload_file_function():