# Attach any file to trackedEntityInstance attribute

**URL:** <https://community.dhis2.org/t/attach-any-file-to-trackedentityinstance-attribute/56600>\
**Category:** App Development\
**Tags:** tracker, api, attribute\
**Created:** [17 January 2024 09:31 UTC](https://community.dhis2.org/t/attach-any-file-to-trackedentityinstance-attribute/56600 "2024-01-17T09:31:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Celso](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/celso/32/36697_2.png) [@Celso](https://community.dhis2.org/u/Celso)\
**Post date:** [17 January 2024 09:31 UTC](https://community.dhis2.org/t/attach-any-file-to-trackedentityinstance-attribute/56600/1 "2024-01-17T09:31:47Z")

</div>

Morning. I’m trying to attach a file to the trackedEntityInstance attribute, but I can’t retrieve it. My attribute is of type file, but I think it only accepts images.  
The first image is the tei profile with two documents attached. I’m tryng to attach a pdf and word to it.

 ![Screenshot 2024-01-17 095250](https://dhis2.b-cdn.net/uploads/default/original/3X/a/a/aa66c1553f8c4030393f69c728079727f6514d2b.png)  
 ![Screenshot 2024-01-17 095858](https://dhis2.b-cdn.net/uploads/default/original/3X/a/4/a48bbbc5c82e44bae51f21bd05d6c9e88fbdba41.png)

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [17 January 2024 17:55 UTC](https://community.dhis2.org/t/attach-any-file-to-trackedentityinstance-attribute/56600/2 "2024-01-17T17:55:35Z")

</div>

Hi @Celso

Is the attribute type Image or File, if you are uploading file types that are not images then the type ‘File’ in the configuration of the attribute needs to be selected;

 ![690x425](https://dhis2.b-cdn.net/uploads/default/original/3X/b/2/b200c7c9538b1bb63311a962f8d1f620022c2efb.png)

---

<div class="post-metadata">

**Author:** ![sami.oracle10g](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/sami.oracle10g/32/40067_2.png) [@sami.oracle10g](https://community.dhis2.org/u/sami.oracle10g)\
**Post date:** [17 January 2024 21:18 UTC](https://community.dhis2.org/t/attach-any-file-to-trackedentityinstance-attribute/56600/3 "2024-01-17T21:18:21Z")

</div>

if you ensured the attribute type was file, could you try to ensure the name path, or the name of the file isn’t so long?
