Hello!
I am currently working on a streamlit site in Python, but I have no idea how to add a file explorer display into the site. Is there any way where I can identify a directory and I can add code that will allow users to view the files through folders and categories (similar to that of github project file explorer).
import os
import streamlit as st
filelist=[]
for root, dirs, files in os.walk("your folder directory"):
for file in files:
filename=os.path.join(root, file)
filelist.append(filename)
st.write(filelist)
Hi @Connor_White,
Here’s my implementation of files explorer that can also add or remove folders:
I see where you said “Here’s my implementation of files explorer that can also add or remove folders” but somehow I don’t see your implementation. I might just be me but I just don’t see it anywhere. Can you help me with this.
Thanks
@TPMStreamer its in the link, listed number 3 there is a section for file explorer, scroll below and you can see the full code of implementing it
its been a long time, but i came across this thread and there was NO really good easy to use solution, i wrote one small example for it here:
feel free to use it