When initialising the file_uploader widget, is there a way to “preload”, which means to show a list with the existing files in the uploaded directory? Thanks for any support!
uploaded_files = st.sidebar.file_uploader(“Choose a file to upload, files will be overwritten!”, accept_multiple_files=True, type=[“pdf”,“docx”,“doc”, “txt”,“rtf”], )
for uploaded_file in uploaded_files:
if uploaded_file is not None:
## Creates a file in writing mode
with open(“./Documents/uploaded/”+uploaded_file.name,‘w+b’) as tempFile:
## Writes the SGY to the file
temp.writeFile(uploaded_file.getbuffer())