List-Item-Attachments control
This control allows you to manage list Item Attachments, you can add or delete associated attachments, the attachments are listed in tile view.
Here is an example of the control:
How to use this control in your solutions
- Install Package
npm i list-item-attachments --save
- Import the control into your component:
import { ListItemAttachments } from 'list-item-attachments/lib/listItemAttachments';
- Use the
ListItemAttachments
control in your code as follows:
<ListItemAttachments
listId='dfa283f4-5faf-4d54-b6b8-5bcaf2725af5'
itemId={1}
context={this.props.context}
disabled={false}
/>
Implementation
The ListItemAttachments
control can be configured with the following properties:
Property | Type | Required | Description |
---|---|---|---|
listId | string | yes | Gui of List |
itemId | string | yes | List Item Id |
webUrl | string | no | URL of site if different of current site, user must have permissions |
disabled | Boolean | no | Disable Control |
context | WebPartContext|ApplicationCustomizerContext | yes | WebPart or Application customiser context |
Source code updated in GitHub.
https://github.com/joaojmendes/list-item-attachments