How to save the file uploaded through streamlit application?

Hi,
I am trying to deploy an application that takes in an image or pdf and performs multiple processes to summarize the content in the document for which, I would like to input a file from the user through streamlit.file_uploader and save it into the hugging spaces for further use or analysis. For now, I am facing the error “File Does Not Exist” when I try to open the file uploaded by any user on the application.
Thank you,
Vasudeva K