From 56b7510c48c1b178ebef05734623048066753fef Mon Sep 17 00:00:00 2001 From: heisner-tillman Date: Thu, 8 Feb 2024 14:11:50 +0100 Subject: [PATCH] Differentiate between type of files on check to process them --- lib/galaxy/webapps/galaxy/services/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/services/tools.py b/lib/galaxy/webapps/galaxy/services/tools.py index 9053cccce56a..491b3b589ea7 100644 --- a/lib/galaxy/webapps/galaxy/services/tools.py +++ b/lib/galaxy/webapps/galaxy/services/tools.py @@ -135,10 +135,10 @@ def execute( raise HTTPException(status_code=400, detail="Must specify a valid tool_id to use this endpoint.") create_payload = payload.model_dump(exclude_unset=True) - # create temporary files from the uploaded files + # process files, when they come in as multipart file data files = {} for key in list(create_payload.keys()): - if key.startswith("files_") or key.startswith("__files_"): + if key.startswith("files_") and isinstance(create_payload[key], UploadFile): files[key] = self.create_temp_file_execute(trans, create_payload.pop(key)) create_payload.update(files) return self._create(trans, create_payload)