I am trying to post an AGOL attachment (i.e. an image) to a Cityworks Work order using the HTTP caller. My goal is to post a unique image to a unique work order (i.e. an image of a sidewalk crack for a sidewalk work order, a pothole image for a pothole work order etc.). The issue starts with my file. I am using AttributeFileWritter to write the file. I use a variable from the feature layer to name my output file (i.e. @Value(WorkorderID).jpeg). This writes to my output directory with no issues. When I go to try and upload this file, when I feed it the PATH + file name + file extension it results in an error “HTTP/FTP Transfer: Failed to open file for resource upload”. When I explicitly “Select” the file it will upload without issues.
My workflow is as follows
I write the image file

I make the call

My body call

This body call is what throws the error. When I add the variable name with extension for the file I want it to upload, it results in the following error “HTTP/FTP Transfer: Failed to open file 'C:\PATH\TO\PICS\WorkOrder_Pictures' for resource upload”.
However when I select the image itself it runs no problem. But this is uploading the same picture to all work orders and not a unique one based on the work order type.

I have also tried various file path manipulations. I have created to create a new attribute with the file name and extension already concatenating, I have tried other name combinations, I have tried temporary files as well all to no avail.
Looking if anyone has had a similar experience. I know there is a similar post but it looks like there was never an official solution.