☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to access file when using html fileinput?

Community Support
beder
beder

I’ve created a bokeh div with text of an html fileinput instead of the bokeh fileinput widget because I need custom css styling. How can I access the file that is input using the html method? (Using bokeh serve to launch app)

A bit similar to the question and discussion here:

⌁   Link to post
_jm
_jm

@beder

Bokeh models have a tags property, which is an empty list by default. Depending on your software organization, flow, and what you need to do, it might suffice to insert the data in that list.

⌁   Link to post
Bryan
Bryan

tags is a reasonable option, you could also potentially stuff the contents in a ColumnDataSource (e.g. if the file is a CSV you could even parse out individual columns). A specific recommendation really depends on what the file is and what you want to do with it.

⌁   Link to post
beder
beder

Thanks all these are good tips. How would I reference this model/property within the javascript code to pass the data back to bokeh?

Edit: After thinking about it, I should reference the bokeh model in the javascript code by searching for it perhaps getelementbyid and using javascript i can save data to a columndatasource for example which could then be used in bokeh. Correct?

⌁   Link to post
beder
beder

Hi all,

I’ve created a bokeh div and added an HTML fileinput widget, a custom label, and some javascript code as a test. I do not believe the js script is being executed or at least I do not see any console output in chrome.

Anyone know why I’m having this issue?

⌁   Link to post

End of archived discussion · Replies are disabled