Hello all,
Similar issues have already been discussed here and there but I can’t get any of the hints working in my case. I’m trying to retrieve the path of a file selected using panel’s (0.7.0) FileInput widget:
file_input = pn.widgets.FileInput(name='Upload file', accept='.H')
@pn.depends(file_input.param.value, watch=True)
def process_file(file_input):
if file_input.value == '' or file_input.value == None:
return 'First select a valid SEP file.'
else:
return SepInfoWrapper(file_input2)
file_input.param.watch(process_file, 'value')
pn.Column(file_input, process_file(file_input)).servable()
When the file has been selected, file_input.value
sends back the good value however file_input.filename
sends back None
. Impossible then to have my SepInfoWrapper
function, which relies on a file path, working…
Is it a bug or is it just me not using it right?