File Download node only serves empty file

This is possibly more of a KNIME Analytics Platform issue, but it’s only a problem when I deploy my workflow to our server as I’m trying to use the File Download node to serve an XLSX file to our users.

knime3

When I configure the node as a normal part of the workflow, all seems well. However, as soon as I encapsulate it into a wrapped metanode, I am unable to select any of my flow variables so when the workflow runs, I am just served with an empty file.

knime1

However my flow variables should all be included for selection:

The XLSX file is definitely getting written to the server, whether I use the Create Temp Dir node or not so I assume it’s flow variables that are the issue here. I tried following the same steps as in this topic but without success. What am I doing wrong?

(Running KAP 3.7.1 and Server 4.8.1)

Best regards,
Kaz

Hi @kaz

Would it be possible to share an example workflow so then I can test it?
I build a workflow that tests what you are trying to do, both locally and on the Server, and everything seems to work.
Please find the workflow attached.

KNIME_File_Download.knwf (17.3 KB)

Best,
Vincenzo

Many thanks for the quick reply @Vincenzo. Unfortunately, when I deploy this workflow on my server, I see the exact same issue.

The XLSX file gets written to the temporary folder on the server:

knime1

but the download link serves up an empty file, perhaps because it’s missing the .XLSX extension:

knime2

Is there anything in the server configuration I could have missed?

Best regards,
Kaz

@kaz

Thanks.
I think there was something miss-configuration in the Create Temp Dir node.
Could you please check with the attached workflow?
I tested it and I was able to download the Excel file from WebPortal.

Hope that helps!
Regards,
VincenzoKNIME_File_Download_v2.knwf (19.0 KB)

Brilliant! Thanks so much @Vincenzo, I’ve got it working now.

In case anyone else runs into the same issue, the key is to set an additional path variable in the Create Temp Dir node as below, and use this as the File Path Variable in the File Download node:

knime

(Rookie mistake I’d fixed earlier: I needed to re-execute the workflow to refresh the File Path Variable dropdown list in the File Download node, but the fix for the empty file issue is the additional path variable as above.)

Best regards,
Kaz

2 Likes

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