How to automatically open and display a docx file directly on a new page through a url link?
(Currently, I can only get the docx file to show up after manually uploading the docx file on the new page…)
How to automatically open and display a docx file directly on a new page through a url link?
(Currently, I can only get the docx file to show up after manually uploading the docx file on the new page…)
Interesting question.
I’m just a noob and someone will probably give a better answer, but - depending on how you’ve deployed this, like if you’re using your own Apache / Nginx / other webserver instead of their SaaS cloud - you could just save the HTML file to a folder being served by your server and then it would be automatically browse-able without needing Streamlit to run. You could just setup a link to it in Streamlit. Right?
So like lets say you’re using NGINX and you’ve got streamlit running app.py in this folder:
/var/www/streamlit/app.py
but NGINX is also serving
/var/www/html
then save the generated file to something like
/var/www/html/mydoc.html
and setup a link in Streamlit that has a variable for the pagename and gets that value from the .docx filename.
Thank you for your reply. I see what you mean. But in fact, I was thinking about how to directly present my docx document content in the streamlit page through a URL link, instead of downloading through the browser access connection as usual.
You can make it into an iFrame this way, within Streamlit. I realize there are many situations I can’t imagine, but in general I’m not sure why you would want it to stay within the Streamlit framework if it’s just pure HTML/CSS - wouldn’t that show the same content but make it slower?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.