I’m interested in writing a custom component which needs to access static resources that could ostensibly be provided by the Tornado server that Streamlit runs on. Is there a way to write a server extension that would allow me to add a route to the Streamlit application that my component could use for this purpose?
Hi @rmorshea, welcome to the Streamlit community!
This is an often-requested feature:
I’ll give our engineering team a poke and see if we can get this moving, it would be great to get more components in the wild
Thanks @randyzwitch, I’ve posted a comment describing my use case. Unfortunately I’ll be partially blocked until this is possible. Perhaps there’s a workaround that, with the understanding it is hacky and brittle, could be used to accomplish this in the short term?
In this case, I’m talking about a lot of the threads around here about providing downloadable files:
Depending on what you are trying to do, you could provide the downloads via fixed links by embedding the content in the page. Of course, this bloats the page significantly, so it’s only appropriate for small amounts of data.
@randyzwitch and @andfanilo I’ve created an issue to describe this feature request. It’s a little rough around the edges since I’ve been short on time, but hopefully there’s still enough information there to spark discussion.
It’ll likely be a bit before I start working on this again (other bug reports to fix for the moment), but when I do, would it be best to post about it here or on the issue itself?
Admittedly, I don’t quite understand the functionality, but if you’re planning on contributing this to the core Streamlit library, then I think commenting on GitHub makes sense.