# Function addAttachment

- addAttachment(feature, layer, attachment, options?): Promise<Attachment>

- Adds an attachment to a feature.

  #### Parameters

  - feature: Feature

    The feature to which the attachment will be added.

  - layer: AttachmentEnabledLayer

    The layer (or table) that the feature belongs to.

  - attachment: AttachmentProperties | Attachment | File

    The file attachment.

  - `Optional` options: AddAttachmentOptions

    Optional options.

  #### Returns Promise<Attachment>