Uploading Files for processing on Knime Business Hub app

Hello,
We are migrating from Knime-server to Knime Business Hub,
We have few useful workflows/app on the knime server : where the end user through the Web-UI is uploading a xlsx/csv file, Knime-server does store it locally, process it and give the ability to see results or to download.
Using “File Upload widget” node then the “CSV reader” node.

This solution work for the File upload widget : How to access files stored in the Data area of Business Hub workflow by using Java Snippet - KNIME Business Hub - KNIME Community Forum

but the CSV reader, I have “Execute failed: Direct access to the local file system is not allowed on KNIME Hub”.

Any solution that is easy for the end user, select a file to upload and being able to read it in the workflow ?

Thank you.

Hi @bpoleselmazak ,

Thank you for your question. The error you see is returned when a file is saved in an absolute path on the remote directory, which is something we don’t recommend (it allows workflow builders to access all files of the executor, which is why we disallow this in default KNIME Server and Business Hub executor configurations),

For use-cases where a file is simply processed within the workflow and not needed after results are returned to the user, I would recommend saving the files either in a temporary directory, or, maybe simpler, relative to the workflow (usually in the “data” area).

Kind regards
Marvin

1 Like

Hi @marvin.kickuth ,

thank you for you quick reply.
With your answer, I have found the way to do it.

if that can be useful for other peoples :

In the “file upload widget” node, tick the “Store uploaded file in Workflow directory”
Then you can use the variable output (path) in a file writer node.

For the file download widget : it has to be a variable string in “CUSTOM/Knime URL” format

thank you.

2 Likes

Hi @bpoleselmazak,

Ha, that is perfect! I wasn’t aware of this node configuration option. This certainly is a clean solution – thanks for sharing!

Glad it works now. :slight_smile:

Happy KNIMEing
Marvin

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