I am going to write simple frontend for my console tool. Generally, it takes a few parameters and input file path for further opening and processing. My idea was to place something like
UI.input # set (attr "type") "file" # set UI.text "input filename"
And then get the selected file path via 'value'.
But it appears that due to security reasons browsers do not provide full path to selected file.
Is it possible to place any file chooser with threepenny-gui?
As far as I know, web browsers do not allow you to obtain a filepath via the fields, for reasons of security. You can only obtain the file contents. Of course, you can always ask for a filepath in a plaintext input field, but that is certainly less convenient for the user.
Filepaths can be obtained from a file chooser dialog if you combine Threepenny with the Electron framework. Working with files is one of the reasons for using Electron.