Introduction
This is a list field customizer developed using SharePoint Framework extension. It will display the attachment related information for a list item. It focus on the default attachment field which will display only an icon, but this customizer will display the info of the attachments list which will help the business users to access the files easily.
Features
- Display Total count of attachments mapped to an item.
- Display List of Attachments with link to the files.
- Display No Attachments message with an icon for the item without the attachments
Properties
- showTotal: This property will allow the users to view the count of attachments mapped to the list item.
- showAttachmentList: This property will allow the users to view the full list of attachments to the list item.
- showNoAttachmentMsg: This property will allow the users to enable or disable the ‘No Attachments’ message.
Note:
- Used PnPJS library for fetching the attachments mapped to the listitem.
- For each item, a transaction call is made to fetch the attachments.
- Please be cautious while using it on large lists.
Preview

Source Code
The above web-part is shared with the community and is of free to use. Please click the below link to download the code and have fun.
https://github.com/pnp/sp-dev-fx-extensions/tree/master/samples/react-field-attachment-info
Happy Coding…
Hi,
how can I activate it for list. I uploaded the sppkg file in my app catalogue and added it to my site. But I can’t see an effect in my list. What i do wrong?
LikeLike
You can activate the control using pnp powershell or cli.
LikeLike
Please try to use the below pnp powershell commands
$list = Get-PnPList -Identity $listTitle
$fld = Get-PnPField -List $list -Identity $fieldTitle
$fld.ClientSideComponentId = “0407eb29-728c-47c3-9f9b-bb1d2e04c4cc”
$fld.Update()
Invoke-PnPQuery
LikeLike