Help reading text files from the webPortal

Hi.

I’m trying to read text files from the webPortal through a JavaSnippet using a FileReader and a BufferedReader. If I execute the WorkFlow from local everything is fine, but when I try to execute it from the WebPortal apparently it’s unable to read the text file. I suppose this is because it doesn’t reach the path to the text file. How can I fix this?

Thank you for your attention and for your help.

Hi @alextyche,

Thanks for contacting us!

Could you please provide us with a workflow example to be able to reproduce your case?

Best,
Dzhanhir

I almost solved it, the only thing I need to know is where to store my text files so they can be read when the workflow is executed from the web portal.

Now I’m storing my text files in a temporary directory but apparently the temporary directory is created locally and i can’t access the local files from the web portal.

Though, when I try to change the configuration of the create temp dir to be created in the workflow folder I’m unable to store my files there.

Hi @alextyche,

Please, have a look at the following articles:

https://docs.knime.com/2020-07/server_update_guide/index.html#local-fs-access

https://docs.knime.com/2020-12/analytics_platform_file_handling_guide/index.html#standard-fs

and try to use the Local File System path

Best,
Dzhanhir

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