# Interface AttachmentEnabledLayer

A feature source that support attachments.

interface AttachmentEnabledLayer {
addAttachment: ((feature: Graphic, attachment: FormData | HTMLFormElement) => Promise<FeatureEditResult>);
deleteAttachments: ((feature: Graphic, attachmentIds: number[]) => Promise<FeatureEditResult[]>);
}

#####
Index

### Properties

addAttachment
deleteAttachments

##
Properties

### addAttachment

addAttachment: ((feature: Graphic, attachment: FormData | HTMLFormElement) => Promise<FeatureEditResult>)

Adds an attachment to a feature.

#### Type declaration

- - (feature, attachment): Promise<FeatureEditResult>

  - Adds an attachment to a feature.

    #### Parameters

    - feature: Graphic

      Feature to which the attachment is to be added.

    - attachment: FormData | HTMLFormElement

      HTML form that contains a file upload field pointing to the file to be added as an attachment.

      Read more...

    #### Returns Promise<FeatureEditResult>

### deleteAttachments

deleteAttachments: ((feature: Graphic, attachmentIds: number[]) => Promise<FeatureEditResult[]>)

Deletes attachments from a feature.

#### Type declaration

- - (feature, attachmentIds): Promise<FeatureEditResult[]>

  - Deletes attachments from a feature.

    #### Parameters

    - feature: Graphic

      Feature containing attachments to be deleted.

    - attachmentIds: number[]

      Ids of the attachments to be deleted.

      Read more...

    #### Returns Promise<FeatureEditResult[]>