Show / Hide Table of Contents

Method UpdateAttachmentAsync

UpdateAttachmentAsync(Attachment, string, string, ReadOnlySpan<byte>)

Asynchronously updates the specified Attachment of this feature.

Declaration
public Task UpdateAttachmentAsync(Attachment attachment, string name, string contentType, ReadOnlySpan<byte> data)
Parameters
Type Name Description
Attachment attachment

The Attachment of the attachment to update.

string name

The name for the attachment.

string contentType

The content type for the attachment.

ReadOnlySpan<byte> data

The data for the attachment.

Returns
Type Description
Task

A Task that represents the asynchronous update attachment operation.

Exceptions
Type Condition
ArgumentNullException

Thrown if attachment is null.

Applies to

Platforms and versions
TargetVersions
.NET200.3 - 300.0
.NET Windows200.3 - 300.0
.NET Android200.3 - 300.0
.NET iOS200.3 - 300.0

UpdateAttachmentAsync(Attachment, string, string, byte[])

Asynchronously updates the specified Attachment of this feature.

Declaration
public Task UpdateAttachmentAsync(Attachment attachment, string name, string contentType, byte[] data)
Parameters
Type Name Description
Attachment attachment

The Attachment of the attachment to update.

string name

The name for the attachment.

string contentType

The content type for the attachment.

byte[] data

The data for the attachment.

Returns
Type Description
Task

A task that represents the asynchronous update attachment operation.

Exceptions
Type Condition
ArgumentNullException

Thrown if attachment is null.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8

UpdateAttachmentAsync(Attachment, string, string, byte[], string)

Asynchronously updates the specified Attachment with keywords of this feature.

Declaration
public Task UpdateAttachmentAsync(Attachment attachment, string name, string contentType, byte[] data, string keywords)
Parameters
Type Name Description
Attachment attachment

The Attachment of the attachment to update.

string name

The name for the attachment.

string contentType

The content type for the attachment.

byte[] data

The data for the attachment.

string keywords

The keywords for the attachment.

Returns
Type Description
Task
Remarks

Throws an error if the feature layer doesn't support the attachment keywords.

Exceptions
Type Condition
ArgumentNullException

Thrown if attachment is null.

ArgumentNullException

Thrown if data is null.

See Also
FeatureServiceSessionType

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300

UpdateAttachmentAsync(Attachment, string, string, ReadOnlySpan<byte>, string)

Asynchronously updates the specified Attachment with keywords of this feature.

Declaration
public Task UpdateAttachmentAsync(Attachment attachment, string name, string contentType, ReadOnlySpan<byte> data, string keywords)
Parameters
Type Name Description
Attachment attachment

The Attachment of the attachment to update.

string name

The name for the attachment.

string contentType

The content type for the attachment.

ReadOnlySpan<byte> data

The data for the attachment.

string keywords

The keywords for the attachment.

Returns
Type Description
Task
Remarks

Throws an error if the feature layer doesn't support the attachment keywords.

Exceptions
Type Condition
ArgumentNullException

Thrown if attachment is null.

See Also
FeatureServiceSessionType

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300

UpdateAttachmentAsync(Attachment, string, string, string, string)

Asynschronously updates the specified Attachment with keywords of this feature.

Declaration
public Task UpdateAttachmentAsync(Attachment attachment, string name, string contentType, string filePath, string keywords)
Parameters
Type Name Description
Attachment attachment

The Attachment of the attachment to update.

string name

The name for the attachment.

string contentType

The content type for the attachment.

string filePath

The file path that will be used for the attachment's content

string keywords

The keywords for the attachment.

Returns
Type Description
Task
Exceptions
Type Condition
FileNotFoundException

Thrown if the file specified by filePath does not exist.

ArgumentNullException

Thrown if attachment is null.

InvalidOperationException

Thrown if the feature table doesn't support attachments.

See Also
FeatureServiceSessionType

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300

UpdateAttachmentAsync(Attachment, string, string, string)

Asysnchronously updates the specified Attachment of this feature.

Declaration
public Task UpdateAttachmentAsync(Attachment attachment, string name, string contentType, string filePath)
Parameters
Type Name Description
Attachment attachment

The Attachment of the attachment to update.

string name

The name for the attachment.

string contentType

The content type for the attachment.

string filePath

The file path that will be used for the attachment's content

Returns
Type Description
Task
Exceptions
Type Condition
ArgumentNullException

Thrown if attachment is null.

FileNotFoundException

Thrown if the file specified by filePath does not exist.

See Also
FeatureServiceSessionType

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300
In this article
Provide feedback
Back to top Copyright © 2025 Esri.