Upgrade Attachments (Data Management)

Summary

Upgrades the attachments functionality on the data.

When attachments are enabled on a feature class, an attachment table and relationship class are created to store the attachment data when an attachment is added to a feature. The attachment table that is created includes fields that are used to store information about the attachment.

Usage

  • At ArcGIS Pro 2.7, this tool adds two more editable fields (KEYWORDS and EXIFINFO) to the attachment table that can be used to store additional information about the attachment. These fields can be used by apps such as ArcGIS Survey123 that set their values through the feature service. For example, an app may set keyword values in the keywords column, which it later uses to query for specific attachments through the feature service. These fields are not exposed when working with attachments in ArcGIS AllSource, but the new fields are visible when you access the attachment table.

    Learn more about using ArcGIS Survey123 with existing feature services

  • Attachments must be enabled on the input dataset before running this tool.

  • If the data is stored in an enterprise geodatabase, this tool must be run as the data owner.

  • This tool adds two fields to the attachment table: KEYWORDS and EXIFINFO. Both fields are editable and nullable.

    • KEYWORDS—Adds searchable keywords that will be associated with the attached file. For example, if the attachment is deemed critical for review, and if the keyword critical is added to this field, the attachment will appear in a search if the query contains the keyword critical.
    • EXIFINFO—Stores additional metadata about the attached file. This field is not used at this time when accessing services in ArcGIS AllSource.

  • Both the KEYWORDS and EXIFINFO fields are supported and used by ArcGIS Online hosted feature services. The KEYWORDS field as well as limited support for the EXIFINFO field are supported by hosted feature services starting at ArcGIS Enterprise 10.8.1. You do not need to run this tool prior to publishing a hosted feature service, as these fields can be enabled after publishing.

  • If you are upgrading the attachments used in an existing service that was previously published through ArcGIS Desktop, you must republish the service using ArcGIS Pro 2.6 or later to support the upgraded attachments.

  • Note:

    Only services published from ArcGIS AllSource to ArcGIS Enterprise 10.8.1 and later support upgraded attachments.

    Caution:

    If the attachments are upgraded, the minimum client version of the attachment table will be set to ArcGIS Pro 2.6. This means the following limitations apply when working with the data in ArcGIS Desktop or earlier versions of ArcGIS AllSource:

    • The attachment table cannot be opened.
    • You can add features or records to the dataset that has attachments, but you cannot delete features or records.
    • If ArcGIS Desktop was used to create a replica of this data, attachments will not be a part of the replica.

  • To downgrade attachments to an earlier version, use the Downgrade Attachments tool.

Parameters

LabelExplanationData Type
Input Dataset

The feature class with attachments enabled.

Table View

Derived Output

LabelExplanationData Type
Updated Dataset

The updated dataset with upgraded attachments.

Table View

arcpy.management.UpgradeAttachments(in_dataset)
NameExplanationData Type
in_dataset

The feature class with attachments enabled.

Table View

Derived Output

NameExplanationData Type
out_dataset

The updated dataset with upgraded attachments.

Table View

Code sample

UpgradeAttachments example (Python window)

Upgrade attachments on a feature class using the UpgradeAttachments function.

import arcpy
arcpy.management.UpgradeAttachments("C:\\MyProject\\MyGDB.gdb\\MyFC")

Environments

This tool does not use any geoprocessing environments.

Related topics