# Function toAttachment

- toAttachment(attachmentInfo, options?): Attachment

- Creates an data/Attachment!Attachment from ArcGIS server attachment info.

  #### Parameters

  - attachmentInfo: AttachmentInfo

    The attachment info to convert.

  - `Optional` options: {
    attachmentInfoUrl?: string;
    gdbVersion?: string;
    }

    Options for converting the attachment.

    - ##### `Optional` attachmentInfoUrl?: string

      The attachment url from the parent feature.

    - ##### `Optional` gdbVersion?: string

      The attachment gdbVersion from the parent feature.

  #### Returns Attachment