From 5809ed54406a541d37646fbb2581b9347b1745a3 Mon Sep 17 00:00:00 2001 From: axelwalter Date: Mon, 19 Feb 2024 11:14:13 +0100 Subject: [PATCH] fix upload file error in online mode --- src/workflow/StreamlitUI.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/workflow/StreamlitUI.py b/src/workflow/StreamlitUI.py index f883b000..8ed06c1f 100644 --- a/src/workflow/StreamlitUI.py +++ b/src/workflow/StreamlitUI.py @@ -70,6 +70,9 @@ def upload_widget( if files: files_dir.mkdir(parents=True, exist_ok=True) for f in files: + # in case of online mode a single file is returned -> put in list + if not isinstance(files, list): + files = [files] if f.name not in [ f.name for f in files_dir.iterdir() ] and f.name.endswith(file_type): @@ -687,4 +690,4 @@ def execution_section(self, start_workflow_function) -> None: st.code(f.read(), language="neon", line_numbers=True) def results_section(self, custom_results_function) -> None: - custom_results_function() \ No newline at end of file + custom_results_function()