Button enable and disable for Pdf uploading

I have written a basic streamlit code to upload pdf and store it in my server. And after the pdf are uploaded a submit and process button will be there which will do the further processing of the pdf.

I am trying here to disable the submit and process button untill all of the pdf are loaded. Each and everytime whenever a new pdf is loaded the button should be disabled untill the pdfs are fully getting uploaded. Then enabled after the Pdf’s are fully uploaded.

How can i do this ?

Hi @Aravindh, and welcome to our forums! :hugs:

I believe what you can do is use Streamlit’s session state to check if PDFs have been uploaded, enabling the “Submit and Process” button only after the upload is complete.

This would ensure the button remains disabled until all files are ready.

Does that make sense?

Best,
Charly