> For the complete documentation index, see [llms.txt](https://www.xapijs.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.xapijs.dev/xapi-wrapper-library/attachment-usages.md).

# Attachment Usages

For a non-exhaustive list of pre-made identifiers for creating statement attachments,  see the [AttachmentUsages](https://github.com/xapijs/xapi/blob/master/src/constants/AttachmentUsages.ts) enum. AttachmentUsages are a static property of the `XAPI` Object.

```typescript
import XAPI, { Attachment } from "@xapi/xapi";

const attachment: Attachment = {
    usageType: XAPI.AttachmentUsages.SUPPORTING_MEDIA,
    display: {
        "en-US": "Image Attachment"
    },
    description: {
        "en-US": "An image of something"
    },
    contentType: "image/jpeg",
    length: imageArrayBufferByteLength,
    sha2: imageArrayBufferSHA2
};
```
