Update Attachment Activity

Description

Update an existing attachment of a feature or record as specified by the attachment ID and the feature or record's object ID.

Usage

You could use a Display Form activity to allow the user to select a file on their computer via a File Picker form element and then use an Update Attachment activity to replace an existing attachment of a feature or record.

Inputs

Url

Optional

Type: String

The URL of the ArcGIS feature layer or table. Either Url or Layer is required.

For example, http://server/arcgis/rest/services/<serviceName>/MapServer/<layerIdOrTableId> or http://server/arcgis/rest/services/<serviceName>/FeatureServer/<layerIdOrTableId>.

Layer

Optional

Type: esri.Layer (3.x, 4.x)*

The ArcGIS feature layer or table. Either Url or Layer is required.

Object Id

Required

Type: Number

The object ID of the feature or record containing the attachment to be updated.

Attachment Id

Required

Type: Number

The ID of the attachment to be updated.

Attachment

Required

Type: File

The file that will replace the existing attachment.

Attachment Name

Optional

Type: String

Optional name for the attachment. When omitted, the name of the file is used.

Geodatabase Version

Optional

Type: String

The geodatabase version on which to perform the operation.

This argument only applies to layers and tables that support versioned data.

Return Edit Moment

Optional

Type: Boolean

Optional input specifying whether the response will report the time the attachment was updated. The default value is false.

Upload Id

Optional

Type: Number

The ID of the attachment that has already been uploaded to the server. This input only applies if the supportsAttachmentsByUploadId property of the layer or table is true.

Timeout

Optional

Type: Number

The time span in milliseconds to wait for the request's results.

* VertiGIS Studio Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of host application. See Underlying Technologies for information.

Outputs

result

Type: any

The result object indicating if the attachment was successfully updated.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Connectivity Requirements

For this activity to work when the device has intermittent connectivity to the network, the activity must run in the following application:

Version Information

Supported from: Geocortex Viewer for HTML5 2.9, ArcGIS Web AppBuilder 2.4.