HOW TO

Add large attachments to a feature using the ArcGIS REST Services Directory

Last Published: March 14, 2023

Summary

Nongeographic data such as documents, images, and videos can be associated to a feature on a map as attachments. Adding attachments to a feature can be completed in ArcGIS Pro, Portal for ArcGIS, ArcGIS Online and ArcGIS Field Maps. However, some Esri products, such as ArcGIS Online, limit the attachment file size to 10 MB.

As an alternative, attachments can be added through the ArcGIS REST Services Directory. The ArcGIS REST Services Directory allows attachments up to 2 GB to be added to features by default. Refer to ArcGIS REST APIs: Uploads for instructions to increase the upload limit.

Procedure

Note:
Ensure the layer allows attachments before adding them. Allow attachments in ArcGIS Pro using the Enable Attachments tool before sharing the layer as a web layer. Refer to ArcGIS Pro: Enable attachments for instructions. 

Alternatively, attachments can also be enabled for features in Portal for ArcGIS. Refer to Portal for ArcGIS: Allow attachments for instructions.
  1. Navigate and log in to the ArcGIS REST Services Directory using the following URL:
http://webadaptorhost.domain.com/webadaptorname/rest
  1. Under Folders, navigate to the folder with the hosted feature service stored.
  2. Under Services, click the hosted feature layer containing the feature layer to add the attachment.
  3. Under Layers, select the layer to add the attachment.
  4. Identify the feature ID of the layer to add the attachment. The feature ID is the object ID of the feature and can be found in the layer's attribute table. Refer to Portal for ArcGIS: Show tables (Map Viewer) for more information.
  5. Add the feature ID and the addAttachment operation to the URL as follows:
http://webadaptorhost.domain.com/webadaptorname/rest/services/<folder_name>/<feature_service>/FeatureServer/<layer_ID>/<feature_ID>/addattachment
  1. On the Add Attachment: (Feature ID<feature ID>) page, for Attachment, click Choose File.
  2. Browse to and select the image to attach to the feature. Click Open.
  3. Click Add Attachment.
The Add Attachment operation

Article ID: 000029873

Software:
  • Portal for ArcGIS
  • ArcGIS Server

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options