Checklist
Summary
The st.file_uploader widget on mobile phones exhibits a timeout issue specifically when tested on Android using the Chrome browser. If there is a delay (e.g., around 15 seconds) after opening a file selection application and before selecting a file, the widget fails to upload properly. The issue can be reproduced using the example provided in the official documentation:
Streamlit File Uploader Documentation.
Reproducible Code Example
# use official demo
# https://docs.streamlit.io/develop/api-reference/widgets/st.file_uploader
import streamlit as st
uploaded_files = st.file_uploader(
"Choose a CSV file", accept_multiple_files=True
)
for uploaded_file in uploaded_files:
bytes_data = uploaded_file.read()
st.write("filename:", uploaded_file.name)

Steps To Reproduce
- Open a mobile browser on an Android device (tested with Chrome).
- Visit the official Streamlit documentation for st.file_uploader:
- URL: https://docs.streamlit.io/develop/api-reference/widgets/st.file_uploader.
- Scroll down to the example for st.file_uploader.
- On the widget, click the "Browse files" button, which prompts Android to ask which application to use.
- Select any file management app (e.g., Samsung's File Browser) but wait for 15 seconds before choosing a file.
- Select a file from the file manager app and confirm.
Expected Behavior
On mobile phone, after selecting the file in the file manager app, the uploaded file name should appear in the Streamlit app, as expected.
Current Behavior
- On mobile phone, when waiting 15 seconds before selecting the file, the Streamlit app shows "connecting" after selecting the file and then fails to display the uploaded file name.
- On mobile phone, if a file is selected immediately without delay, the widget works as expected, file name is displayed, and no timeout occurs.
Is this a regression?
Debug info
- Device: Samsung S24
- OS: Android 15.0
- Browser: Chrome 136.0.7103.125
- Python version: 3.10
- Streamlit Version: 1.45.0
- Internet Connection: Stable WiFi during testing.
Additional Information
- This issue seems time-sensitive and suggests a possible timeout behavior when Android switches between File Manager App and the Browser.
- No issues observed on desktop browsers with the same testing process.
Checklist
Summary
The st.file_uploader widget on mobile phones exhibits a timeout issue specifically when tested on Android using the Chrome browser. If there is a delay (e.g., around 15 seconds) after opening a file selection application and before selecting a file, the widget fails to upload properly. The issue can be reproduced using the example provided in the official documentation:
Streamlit File Uploader Documentation.
Reproducible Code Example
Steps To Reproduce
Expected Behavior
On mobile phone, after selecting the file in the file manager app, the uploaded file name should appear in the Streamlit app, as expected.
Current Behavior
Is this a regression?
Debug info
Additional Information