# Task Attachments

**URL:** <https://forum.flowable.org/t/task-attachments/1669>\
**Category:** Flowable Engine\
**Created:** [February 20, 2018, 8:24am UTC](https://forum.flowable.org/t/task-attachments/1669 "2018-02-20T08:24:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://forum.flowable.org/u/dao)\
**Post date:** [February 20, 2018, 8:24am UTC](https://forum.flowable.org/t/task-attachments/1669/1 "2018-02-20T08:24:31Z")

</div>

I am trying to get attachments from delegate using methods of TaskService, like

- getTaskAttachments(String taskId)
- getProcessInstanceAttachments(String processInstanceId)
- getAttachment(String attachmentId)
- and other

But all these methods return empty array or null. Although i have seen attachments in database and content engine shows all attachments in content engine.  
Also works content-api/content-service/content-items/{attachmentId}/data rest request.  
How can i get attachment of task in delegate class?  
Upd: Using Content service i have got attachments, but i build it manually.  
How get this Content service in delegate?

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [February 28, 2018, 8:50am UTC](https://forum.flowable.org/t/task-attachments/1669/2 "2018-02-28T08:50:09Z")

</div>

In your delegate, you can call org.flowable.engine.impl.util.CommandContextUtil.getContentService()
