# AttachmentsApi.list()

```ts
list(): Promise<AttachmentInfo[]>
```

Embedded files. Without the `extract` feature every name is `''`. Needs no feature.

- Kind: method
- Since: 1.0.0

Returns `Promise<AttachmentInfo[]>`: Each `{ index, name, size }`: the index to pass to `data()` / `delete()`, the name as stored in the file (untrusted input), and the size in bytes (`0` when the entry has no file stream).

Throws:

- `DOCUMENT_CLOSED` — the document has been closed.

```ts
const files = await doc.attachments.list();
```

Part of [AttachmentsApi](https://kernstra.com/docs/web-sdk/api/doc-attachments) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/doc-attachments/list
