Show / Hide Table of Contents

Method AddAttachmentAsync

AddAttachmentAsync(string, string, string)

Adds a new attachment to this AttachmentsFormElement from the specified file.

Declaration
public Task<FormAttachment> AddAttachmentAsync(string name, string contentType, string filePath)
Parameters
Type Name Description
string name

The attachment name.

string contentType

The type of content.

string filePath

File path that will be used for the attachment's content.

Returns
Type Description
Task<FormAttachment>

A Task that returns a FormAttachment.

Exceptions
Type Condition
FileNotFoundException

Thrown if the specified file does not exist.

Applies to

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