# File download from a repository in Constellation UI

**URL:** <https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859>\
**Category:** User Experience\
**Tags:** user-experience, pega-infinity, constellation\
**Created:** [July 22, 2024, 4:26pm UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859 "2024-07-22T16:26:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gowtham\_Allu](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@Gowtham\_Allu](https://forums.pega.com/u/Gowtham_Allu)\
**Post date:** [July 22, 2024, 4:26pm UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859/1 "2024-07-22T16:26:14Z")

</div>

I am trying to download a file from a repository using repository APIs/D\_pxGetFile DP. In traditional UI, the file content is retrieved using D\_pxGetFile datapage and a java step in an activity is used to “sendFile” to browser on click of a link/button.

What is an equivalent approach in Constellation UI?

@RichardMarsot

---

<div class="post-metadata">

**Author:** ![RichardMarsot](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/richardmarsot/32/23530_2.png) [@RichardMarsot](https://forums.pega.com/u/RichardMarsot)\
**Post date:** [July 23, 2024, 7:24am UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859/2 "2024-07-23T07:24:12Z")

</div>

@Gowtham Allu if the file is an attachment to a case, you can use the dx api [Pegasystems Documentation](https://docs.pega.com/bundle/dx-api/page/platform/dx-api/endpoint-get-attachments-attachmentid_1.html) - if this is a file that you get through custom activity - you will need to create your own API - In any case, you will need to create a Constellation DX Component.

To reduce the amount of customization, the best practice should be to link the file as an attachment property and use external storage [Pegasystems Documentation](https://docs.pega.com/bundle/platform/page/platform/case-management/storing-case-attachments-using-external.html)

---

<div class="post-metadata">

**Author:** ![Gowtham\_Allu](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@Gowtham\_Allu](https://forums.pega.com/u/Gowtham_Allu)\
**Post date:** [July 23, 2024, 1:57pm UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859/3 "2024-07-23T13:57:22Z")

</div>

@RichardMarsot These are not case attachments. They are notice/letter PDFs sent to a customer to be displayed as a table in a Customer Service Composite screen in Interaction case.

---

<div class="post-metadata">

**Author:** ![RichardMarsot](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/richardmarsot/32/23530_2.png) [@RichardMarsot](https://forums.pega.com/u/RichardMarsot)\
**Post date:** [October 3, 2024, 3:25pm UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859/4 "2024-10-03T15:25:28Z")

</div>

@Gowtham Allu in Constellation UI - there is no activity but you would implement this by calling the DX data\_View API that will return a json payload where one of the attribute is the binary content - you can send use a browser API to download the file on the client using a hidden link - there are lots of article on the web on how to download a file using javascript

---

<div class="post-metadata">

**Author:** ![josenavas](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/josenavas/32/23453_2.png) [@josenavas](https://forums.pega.com/u/josenavas)\
**Post date:** [October 3, 2024, 3:46pm UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859/5 "2024-10-03T15:46:30Z")

</div>

Hi @RichardMarsot, can the DX data\_View API access the binary files (RULE-FILE-BINARY) stored in our pega environment?

Wondering in case we create a custom DX component of type Field (and subtype URL/Icon Button URL) we can filter in authoring time the rules of class RULE-FILE-BINARY were we previously created the binary rule.

Thanks

_-Jose_

---

<div class="post-metadata">

**Author:** ![RichardMarsot](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/richardmarsot/32/23530_2.png) [@RichardMarsot](https://forums.pega.com/u/RichardMarsot)\
**Post date:** [October 3, 2024, 4:16pm UTC](https://forums.pega.com/t/file-download-from-a-repository-in-constellation-ui/7859/6 "2024-10-03T16:16:09Z")

</div>

@josenavas yes a data view api calls a DP - your DP can use an activity to open an rules including binary files -

The field DX component will let you select a property in the rule-file-binary - not a rule instance - this is not a smart prompt for selecting a rule - You just need to wrap the rule opening with a DP and an activity.
