How "File Upload" works?

I am trying to create an webportal workflow. And I want to parse a user uploaded SDF file and make some operations. But I was confused by the "File Upload" Nodes. How it works?

I have a "File Upload" node and an "SDF Reader" node. I uses "UploadedSDF" as Variable Name of "File Upload" node.

Here is my questions:

1. How to assign the uploaded files destinations? I want to save it into a subfolder of the job folder.

2. How to parse the uploaded File's location to SDF file? I input the variable name into "File Selection" in SDF Reader, but it complains Can not access 'file:UploadedSDF': UploadedSDF(The system cannot find the file specified).

3. Why we need a "Default File". The workflow should never work when the user did not supply a file. So i do not know why i must give a default file to make the node available.

Apparently I do not catch the idea of "flow variable". Is there some documements or tutorial avaiable?

Thank you.

Hello,

I've moved this post to our newly created KNIME Server section. Our goal is for this to become a useful resource for all of our KNIME Server users.

1) The files are automatically uploaded to a temporary directory, which is managed by java. If you want to move the file to a new location, you can try the new file handling nodes in KNIME Labs, but this isn't necesarry for most applciations.

2) The variable output from the file reader node can be attached to the SDF Reader node, and the file URL variable will be automagically be translated to refer to the file's upload location on the server.

3) The default file is just a placeholder for the file that the user will eventually upload. These placeholders are often invaluable when developing a workflow as they allow you to quickly test your flow without having to change the structure of the workflow when working with it locally.

I've attached a small example of how to read an SDF file with the KNIME Webportal. In paticular, have a look at the URLs section of the flowvariable tab of the SDF Reader. This is where we tell KNIME to use the URL from the File Upload node.

Cheers,

Aaron

screen_shot_2013-01-17_at_2.29.57_pm.png

sdf_upload.zip

Thank you. I will study it. :)

Hi,

I want to achieve something similar, i.e. read SDF files into the Web Portal. However, the File Upload Quick Form node has changed, and I can’t figure out where to specify the Flow Variable for the file path in the SDF Reader node, as there no longer is an entry ‘0’, only ‘array-size’…

Please advice.

Thank you,

Evert

Hi there!

Don’t have the SDF Reader node but try assigning some dummy name where the actual name goes (Input sources?) and then perhaps you will see ‘0’ on flow variable tab.
For example. If you have a Table Creator with no entries then on flow variable tab under values you will see only ‘array-size’. When you enter something in first cell under values you will see ‘0’ after ‘array-size’…

Br,
Ivan