Webportal File Upload not filtering to file types

Hi all, I’m hoping someone can help me with a minor annoyance.

I’m working on a workflow that takes a csv input from the user as template. I have a wrapped metanode with a file uploader and have set this to limit file types to .csv. But when the user clicks the Select File button the dialog box they get shows all file types.

If they select a different file type the workflow won’t proceed, and they are told (for example) “File Extension .xlsx is not valid” but is there a way to set the filter in the dialog box to only show csv?

Hi @phick,

without a screenshot it is difficult to comprehend the explained scenario. I believe you are using a widget. If that is the case, you might first want to list all files in a filer and pre-filter them based on your need so you present a definite list of files to the user to chose from.

Best
Mike

I’ll try and remember to grab a screenshot next week. It’s the webportal interface, the user gets the Select File button which launches the standard windows file selection window. In the bottom right is where a windows application would normally filter by file type but this is showing . (from memory). If they select any type other than csv they are told it’s not valid, but only after uploading the file and then selecting the next page in the webportal interface. Just seems counterintuitive that the option to limit by filtetype doesn’t pass this out to the file selection window.

Thanks for the explanation. The described scenario seems highly specific and I struggle to imagine in with my inner eye appropriately. Whatever information you could share, would definitely help your needs.

Hopefully this is better at explaining, you can see in the File Upload configuration I have configured to require a csv.
image

What the user sees in the Webportal interface (with some mild redactions):
image
And when they click the Select File button, this is the dialog, note that the filter in the bottom right is set to all files .:

If they select the wrong file type, the user is told the extension is not valid, but it seems like it would be a better interface if the filter in the dialog box could filter to the allowed types.
Annotation 2024-05-07 094522

It’s not workflow breaking, but just feels like it’s not working quite as intended.

Thanks for the details. That might be an issue how the accept attribute is implemented by Knime and thus possibly being aa bug or feature improvement.

https://www.geeksforgeeks.org/how-to-create-input-field-that-accept-csv-file-in-html/

In order to properly test and eventually provide aa solution for this, a test workflow for reproduction would be required. Can you share one please?

Hey @phick,

what version of KNIME are you using? I just tried to reproduce it and for me I have csv pre-selected in the file chooser window if I limit it to csv.

Greetings,
Daniel

I’m not sure what the exact version of our server is, but I know it’s not up to date. We are currently migrating to a current version, so this is quite probably the issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.