# j-Attachments

> The component displays attachments in the simple list. A user can remove attachments.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 73585e39ce9439d9f3720ad8cfa19bf7be8910e6e207b5048251a99982743dde
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

The component displays attachments in the simple list. A user can remove attachments.


A value be `Array` in the form:

```
[
	{
		name: 'attachment.docx',
		url: 'url_to_download',
		size: 1024, // in bytes
		dtcreated: Date
	}
]
```

Use it with `<ui-component name="attachments">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<ui-component name="attachments" path="common.attachments"></ui-component>

<script>

	var common = {};

	common.attachments = [];
	common.attachments.push({ name: 'logo.png', url: 'https://cdn.totaljs.com/logo.png', size: 5700, dtcreated: NOW });

</script>
```
