Configuring web tool output to export jpegs

460
0
08-11-2020 07:17 AM
NeveenD
New Contributor II

Hello,

I created a python script tool that exports attachments (jpegs) using the following code:

open(fileLocation + os.sep + str(rel_objectid) + "_" + Name, 'wb').write(binaryRep.tobytes())

Originally, fileLocation was set as arcpy.GetParameterAsText(0), routing to my temp folder. I then changed it to arcpy.env.scratchFolder and also tried ' r"C:\temp". The script tool worked with no issues in ArcGIS Pro. When exporting to WebApp Builder widget, the output is locked and grayed out where I cannot make edits. While I did check the option to allow for export of these image attachments, held in a tableview or dbf, the tool executes but does not return output (the output tab in the widget is blank). Is there an issue with the code itself, as it's intended to write locally? Is it maybe that I will need to subscribe to Image Hosting on AGP?

Any insight is appreciated.

Thank you

0 Kudos
0 Replies