File Upload Widget

Creates a file upload widget for use in components views. Variable output representing the file path as variable. In case an absolute file path is selected the node will populate three variables: one representing the path, one representing the URL and one representing the URL as a path variable. If a URL is selected as default file only the URL variable and the URL(path) variable are defined.

The node supports custom CSS styling. You can simply put CSS rules into a single string and set it as a flow variable 'customCSS' in the node configuration dialog. You will find the list of available classes and their description on our documentation page.

Options

Label
A descriptive label that will be shown in the view.
Description
Some lines of description that will be shown in the view, for instance by means of a tooltip.
Valid File Extensions
A list of file extensions that is used as filter in the file browser (not only the one in the "Default File" option but also in a remote file browser), e.g. ".csv,.csv.gz" will filter for files ending with ".csv" or ".csv.gz". Leave empty to accept any file.
Default File
The file that will be used during design time, i.e. when no file is uploaded by means of the, e.g. KNIME WebPortal.
It is possible to enter a URL here. This can be useful if a default file is to be addressed with the knime:// protocol (e.g. knime://knime.workflow/../data/file.csv) or if the file is present on a remote server.
Timeout
The time in seconds after which the connection times out. The timeout is used when testing the existence of default files. The default is set to 1 second and should be sufficient in most cases.
Disable output, if file does not exist
If enabled, output port will be disabled, if the provided file does not exist or cannot be accessed.
This option is helpful in the wizard (WebPortal) execution to keep this and subsequent nodes from failing during execution.
Store uploaded file in workflow directory
Check this box to store the file in a temp directory in the workflow directory (e.g. /path/to/workflow/tmp/file_name). Otherwise, it will be created in the temp directory of the system, which can lead to unwanted behaviour, i.e. reader nodes do not allow direct access to the file system on KNIME Server or due to swapping a job between systems in a server/executor environment. Note that the uploaded file will be deleted from the workflow when the workflow is discarded or reset.

Input Ports

This node has no input ports

Output Ports

Icon
Variable output representing the file path as variable. In case an absolute file path is selected the node will populate three variables: one representing the path, one representing the URL and one representing the URL as a path variable. If a URL is selected as default file only the URL variable and the URL(path) variable are defined. Additionally the original file name is retained as a flow variable.

Popular Successors

Views

Interactive View: File Upload
View containing the file upload component. Please note that only small files should be uploaded when using the view inside the KNIME Analytics Platform (not on the WebPortal). If a large file is supposed to be selected consider setting it as the default file or use the Local File Browser node.

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.