--- Added: v2.0.0 Status: Active Last reviewed: 2018-03-21 --- # Process Attachment List component Displays attached documents on a specified process instance ![process-attachment-list-sample](../docassets/images/process-attachment-list.png) ## Basic Usage ```html ``` Make sure to override the [UploadService](../core/upload.service.md) with the [ProcessUploadService](../../lib/process-services/task-list/services/process-upload.service.ts) ```ts import { UploadService } from '@alfresco/adf-core'; import { ProcessUploadService } from '@alfresco/adf-process-services'; @Component({ selector: 'my-custom-process-attachment', providers: [ { provide: UploadService, useClass: ProcessUploadService } ] }) export class MyCustomProcessAttachmentComponent { constructor() {} } ``` ## Class members ### Properties | Name | Type | Default value | Description | | -- | -- | -- | -- | | disabled | `boolean` | false | Disable/Enable read-only mode for attachment list. | | processInstanceId | `string` | | (**required**) The ID of the process instance to display. | ### Events | Name | Type | Description | | -- | -- | -- | | attachmentClick | `EventEmitter` | Emitted when the attachment is double-clicked or the view option is selected from the context menu by the user from within the component. Returns a Blob representing the object that was clicked. | | error | `EventEmitter` | Emitted when the attachment list is not able to fetch the attachments (eg, following a network error). | | success | `EventEmitter` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | ## Details ### How to Add Drag and Drop Functionality You can wrap the attachment list with an [Upload Drag Area component](../content-services/upload-drag-area.component.md) to let the user upload attachments to empty lists. When you do this, you can also supply a custom _no content template_ (using <adf-empty-list>) to invite the user to add their attachments: ```html
//no content template
{{This List is empty}}
{{Drag and drop to upload}}
``` If the List is empty, the custom no-content template we passed is displayed. ![custom-no-content-drag-drop-template-sample](../docassets/images/custom-no-content-drag-drop-template.png) A default template will be used if you don't supply a custom one to override it: ![default-no-content-template-sample](../docassets/images/default-no-content-template.png)