PlutoUI filepicker How can I access the file path

I am using the command

@bind name PlutoUI.FilePicker([MIME("text/plain")])

to obtain a filename. How can I obtain the path to the file that was selected.

I don’t think there’s an easy way to do that. Most browsers don’t support file system access for security reasons. Is a file picker the only option? If not, you could simply use a text input and the user would copy/paste the file path there rather than selecting the file with a selector.

The equivalent of the Matlab uigetfile, which returns the filename, pathname and filterindex would be useful for my purposes. An alternate method as you suggest may work, but does not seem nearly as elegant.

Interestingly when I first developed the Pluto notebook a month or two ago, both CSV.File and readlines would read the selected file from a subdirectory. Now CSF.File still works from one Pluto workbook (readlines not used in this workbook), and neither readlines nor CSV.File from the other Pluto workbook. There is no obvious reason why the difference.

This is the file picker code from

struct FilePicker
    accept::Array{MIME,1}
end
FilePicker() = FilePicker(MIME[])

function show(io::IO, ::MIME"text/html", filepicker::FilePicker)
    print(io, """<input type='file' accept='""")
    join(io, string.(filepicker.accept), ",")
    print(io, "'>")
end

get(select::FilePicker) = Dict("name" => "", "data" => UInt8[], "type" => "")

There are a number of packages that allow access to the path, now. Gtk is one such. See example below:

using Gtk
filedir = open_dialog("select file")