HOW TO
In ArcGIS Pro, file attachments, such as documents and images, can be added to feature classes. They are stored in a geodatabase feature class attachment table and linked to individual features. Refer to ArcGIS Pro: Add or remove file attachments for more information.
This article provides the workflow to limit the size of file attachments in a feature class in ArcGIS Pro. This method is useful when limiting the size of attachments, for example images, for newly created features on a map.
icon to open the Expression Builder window.
if ($feature.<dataSizeField> > <dataSize>) return false;
return true;
if ($feature.DATA_SIZE > 2000000) return false;
return true;
Note: The units of the data size field in the attachment table is in bytes. For example, a value of 2,000,000 is equal to 2MB.
icon to verify the expression, and click OK.

The image below shows an error message returned when adding an attachment to a feature if the file size is larger than the limit specified in the constraint rule.

Article ID: 000031269
Get help from ArcGIS experts
Start chatting now