Skip to content

Commit

Permalink
fix upload file error in online mode
Browse files Browse the repository at this point in the history
  • Loading branch information
axelwalter authored Feb 19, 2024
1 parent 2490777 commit 5809ed5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/workflow/StreamlitUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
custom_results_function()

0 comments on commit 5809ed5

Please sign in to comment.