> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# msm-documents-upload

> Upload UI component.

`msm-documents-upload` is a web component built with Lit.

## Purpose

Upload files or images from the UI.

## Usage

```html theme={null}
<msm-documents-upload></msm-documents-upload>
```

## Attributes / properties

| Name       | Type   | Default | Notes         |
| ---------- | ------ | ------- | ------------- |
| `payload`  | object | `{}`    |               |
| `entityId` | string | `""`    | property only |
| `urls`     | array  | -       |               |
| `url`      | string | -       |               |

## Events

| Event             | detail | When |
| ----------------- | ------ | ---- |
| `msm-file-upload` | -      |      |
| `msm-file-remove` | -      |      |

### Usage

```html theme={null}
<msm-documents-upload>
</msm-documents-upload>

<script>
  const el = document.querySelector("msm-documents-upload");
  el.addEventListener("msm-file-upload", (e) => {
    console.log(e.detail);
  });

  el.addEventListener("msm-file-remove", (e) => {
    console.log(e.detail);
  });

</script>
```

## CSS parts

* `base`

## Slots

No documented slots.

## Methods

No documented public methods.

## Notes

* Custom events bubble.
