PlutoUI.jl icon indicating copy to clipboard operation
PlutoUI.jl copied to clipboard

Filepicker can not reload a file

Open GiggleLiu opened this issue 5 years ago • 4 comments

Sometimes I need to reload a configuration file from my disk. An intuitive approach is to pick the same file. It would be nice to refresh the value automatically.

GiggleLiu avatar Dec 05 '20 13:12 GiggleLiu

Hi @GiggleLiu! This happens while using PlutoUI filepicker, correct?

pankgeorg avatar Dec 09 '20 19:12 pankgeorg

@pankgeorg Yes.

GiggleLiu avatar Dec 09 '20 19:12 GiggleLiu

Ok it seems that's the default browser behaviour; doesn't re-read the file if it's the same. A solution is the below: delete the file when user clicks on the input again. @bind file html"""<input type="file" onclick="this.value=null" >""" (instead of @bind file FilePicker())

pankgeorg avatar Dec 09 '20 20:12 pankgeorg

Ok it seems that's the default browser behaviour; doesn't re-read the file if it's the same. A solution is the below: delete the file when user clicks on the input again. @bind file html"""<input type="file" onclick="this.value=null" >""" (instead of @bind file FilePicker())

@pankgeorg any chance this workaround could be incorporated into PlutoUI.FilePicker?

juliohm avatar Aug 14 '23 11:08 juliohm