My Streamlit app works perfectly locally, but when deployed, I’m facing two main issues:
- File Upload Problems: Users cannot upload files - getting “Cannot request file URLs” errors in console
- Menu Navigation Issues: When switching between menu options, previous page content persists
File upload section that’s causing issues
uploaded_bytes = uploaded_file.read() # This works locally but fails in production
uploaded_file.seek(0)
df = pd.read_csv(uploaded_file) # This might be causing the file URL error
Menu navigation section
with main_content_container.container():
if st.session_state.selected_menu == “Home”:
main_app()
elif st.session_state.selected_menu == “Invoices”:
show_upload_logs()
- What’s the proper way to handle file uploads in production ? 2. How can I ensure clean page transitions between menu options? 3. Are there specific deployment considerations for file handling? -
Deployment Platform: AWS