File uploader giving AxiosError: Network Error when deployed on server

If you’re creating a debugging post, please include the following info:

  1. Are you running your app locally or is it deployed?
    Locally its running fine, giving error on server
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform? No
    b. Share the link to the public deployed app. It’s deployed on a private server
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions. streamlit (1.32.2) python (3.11.4)

Error message:
AxiosError: Network Error

Local:

Server:

I have tried all possible workarounds available on other discussions. Nothing worked. There’s no security firewall implied.

Please help. I have stucked on this issue for more than 2 days

Hi @ujjawal_jani, I was also facing this error while uploading files in my Streamlit app, and it was fixed by adding these lines to the ~/.streamlit/config.toml file:

[server]
enableCORS=false
enableXsrfProtection=false

Already tried this. Still facing same issue.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.