How do we reference a local HTML file in a dash app using Dash bootstrap Components?. I am able to add published websites but not local files.
Thanks for your time.
se = dbc.Row(
[
dbc.Col(dbc.NavLink(“C”, active=True, href=“file:///C:/Users/username/Report.html”, style={‘color’: ‘white’})),
],
no_gutters=True,
className=“ml-auto flex-nowrap mt-3 mt-md-0”,
align=“center”,
)
I’m having the same problem. I would like to link (preferably with a different tab or window) to a local pdf HELP/instructions page. Any ideas?
I figured out how to add local html files, but I am not sure about PDFs. Try it and see if it works.
- Create a project folder and put your app.py file inside it.
- Inside the project folder, you have to create another folder called assets and put your pdf file inside it.
- Then, reference the file like this: href="/assets/report.pdf"
Can you share some of your code? A bit hard to say what the issue might be without more details