Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
send annot file directly to item
Browse files Browse the repository at this point in the history
  • Loading branch information
subinkitware committed Nov 29, 2023
1 parent e558dd0 commit 528b7e6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions girder_worker_utils/transforms/contrib/girder_io.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import shutil
import tempfile
import json

from ..girder_io import GirderClientTransform, GirderUploadToFolder

Expand Down Expand Up @@ -102,10 +101,7 @@ def transform(self, *args, **kwargs):
return unique_id

with open(path, 'r') as input_file:
file_contents = input_file.read()

item_id = self.upload_kwargs.get('itemId')
if item_id is not None:
self.gc.post(f"annotation?itemId={item_id}", json=json.loads(file_contents))

self.gc.post(f"annotation/item/{item_id}",data=input_file)
return unique_id

0 comments on commit 528b7e6

Please sign in to comment.