Skip to content

Commit

Permalink
Differentiate between type of files on check to process them
Browse files Browse the repository at this point in the history
  • Loading branch information
heisner-tillman committed Feb 26, 2024
1 parent e662c4d commit 56b7510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/galaxy/services/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 56b7510

Please sign in to comment.