updateAttachment

suspend fun updateAttachment(attachmentInfo: Attachment, name: String, contentType: String, data: ByteArray?, keywords: String = ""): Result<Unit>

Updates the given attachment, with keywords, of this feature. This method will overwrite and/or clear any existing keywords on the attachment.

Return

An ArcGISException will be set on the Result if the feature layer doesn't support the attachment keywords

Since

300.0.0

Parameters

attachmentInfo

Information describing the attachment.

name

The attachment name.

contentType

The type of the content.

data

The attachment data. If null, the existing data will be unchanged.

keywords

Attachment keywords. The attachment keywords can be accessed using Attachment.keywords.

See also


suspend fun updateAttachment(attachmentInfo: Attachment, name: String, contentType: String, filePath: String, keywords: String = ""): Result<Unit>

Updates the given attachment, with keywords, of this feature. This method will overwrite and/or clear any existing keywords on the attachment.

Return

A FileNotFoundException will be set on the Result if the file at filePath does not exist, and an ArcGISException will be set on the Result if the feature table does not support keywords

Since

300.0.0

Parameters

attachmentInfo

Information describing the attachment.

name

The name of the Attachment.

contentType

The type of content.

filePath

Path to a file that will be used for the attachment's content.

keywords

Attachment keywords. The attachment keywords can be accessed using Attachment.keywords.

See also