Copy Attachments b/w Features?
Is there a way to copy all of the attachments (attached to a feature class) to another feature class?
I can query, add, & delete attachments, but I am unsure how to copy, or if it is even possible. The File Uri param suggests I need the actual file, not the REST url of the existing attachment. I am stuck on looping through my Query Attachments Results and trying to add each attachment via the Add Attachment activity to my other feature class. Again, it is not working, so I am not sure if this is the best approach. Seems like I'd almost have to download it somehow to a temp area, then upload it as a 'new' attachment to the other feature class.
Any ideas?
Ryan
-
I ended up having to write the existing attachment(s) to a directory, then re-add them using the Add Attachments activity to the new feature class's attachments table.
I was able to append the records to the new attachments related table, but could not hack the GLOBALID, which is the primary key to tie the records b/w the feature class and attachment(s) together.
Just FYI...
Ryan
0
Please sign in to leave a comment.
Comments
1 comment