Serving static files

Hello, everybody.

So I’ve created a form on Streamlit cloud, that saves this text file on my app’s path static/config.json.

However, I can’t seem to access it, as I get the 404 error when I try to access it on the web, at https://my-apps-name.streamlit.app/static/config.json.

My Secrets file look like that:

STREAMLIT_SERVER_ENABLE_STATIC_SERVING=true

[server]
enableStaticServing = true

Can somebody please tell me what I am doing wrong?

Thank you all.

From the docs:

To enable this feature, set enableStaticServing = true under [server] in your config file, or environment variable STREAMLIT_SERVER_ENABLE_STATIC_SERVING=true.

1 Like

Thanks! I did that on my Secrets file. How do I access the Config file of my app, when running on Streamlit Cloud?

The same as any other file? I don’t think I understand your question.

Ok.

When I got to my App Settings, I see only General, Settings and Secrets. No Config file.

That is not where files are. You create a config file in the same way you create a file with code or data. It is just a file.

I’m sorry, I’m really a novice at that… How do I do this on the cloud? Because I’m using Streamlit cloud. I just create a config file on my App’s GItHub repository? :thinking:

Thank you for your time.

Exactly. I found the details in the docs too:

1 Like

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