Skip to content

Commit 3808fe4

Browse files
fix: attachment batch transform
1 parent 283bd1b commit 3808fe4

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/uipath/platform/resume_triggers/_protocol.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Implementation of UiPath resume trigger protocols."""
22

33
import json
4-
import os
54
import uuid
65
from typing import Any
76

@@ -293,7 +292,20 @@ async def read_trigger(self, trigger: UiPathResumeTrigger) -> Any | None:
293292
f"{e.message}",
294293
) from e
295294

296-
return f"Batch transform completed. Modified file available at {os.path.abspath(destination_path)}"
295+
# Upload result as job attachment
296+
result_attachment_id = await uipath.attachments.upload_async(
297+
name=destination_path,
298+
source_path=destination_path,
299+
)
300+
301+
mime_type = "text/csv"
302+
303+
# Return attachment info
304+
return {
305+
"ID": str(result_attachment_id),
306+
"FullName": destination_path,
307+
"MimeType": mime_type,
308+
}
297309

298310
case UiPathResumeTriggerType.IXP_EXTRACTION:
299311
if trigger.item_key:

0 commit comments

Comments
 (0)