Show / Hide Table of Contents

Method AddAttachment

AddAttachment(string, string, ReadOnlySpan<byte>)

Adds a new attachment to this AttachmentsFormElement using the supplied final attachment name.

Declaration
[Obsolete("This method will not validate the duration of audio and video attachments. Use AddAttachmentAsync instead.")]
public FormAttachment AddAttachment(string name, string contentType, ReadOnlySpan<byte> data)
Parameters
Type Name Description
string name

The attachment name.

string contentType

The type of content.

ReadOnlySpan<byte> data

The attachment data.

Returns
Type Description
FormAttachment

The new FormAttachment.

Remarks

The attachment name is provided by the name parameter. When UseOriginalFilename is true, this should be the original file name; otherwise, use the overload of this method without a name to have one generated automatically.

Applies to

Platforms and versions
TargetVersions
.NET200.5 - 300.1
.NET Windows200.5 - 300.1
.NET Android200.5 - 300.1
.NET iOS200.5 - 300.1

AddAttachment(string, string, byte[])

Adds a new attachment to this AttachmentsFormElement using the supplied final attachment name.

Declaration
[Obsolete("This method will not validate the duration of audio and video attachments. Use AddAttachmentAsync instead.")]
public FormAttachment AddAttachment(string name, string contentType, byte[] data)
Parameters
Type Name Description
string name

The attachment name.

string contentType

The type of content.

byte[] data

The attachment data.

Returns
Type Description
FormAttachment

The new FormAttachment.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.5 - 200.8
.NET200.5 - 300.1
.NET Windows200.5 - 300.1
.NET Android200.5 - 300.1
.NET iOS200.5 - 300.1
.NET Framework200.5 - 200.8
UWP200.5 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.