Hi @Gassim,
Can you please provide me the API for download the file downloading of the Trackedentityattribute File Type Field.
Hi @Gassim,
Can you please provide me the API for download the file downloading of the Trackedentityattribute File Type Field.
Try t use API point POST server_address/api/events/stage_uid/element_uid and payload will be your jpg/pdf/doc files
Hi Ulanbek,
Thank you so much for your replay , The API which you have provide is for the program stage data element file upload However I need the GET API for the download the tacked entity attribute FILE_RESOURCE type file uploaded.
@Ramesh_Reddy use your-server-address/api/events/files?eventUid=EVENT_UID&dataElementUid=DATA_ELEMENT_UID
Hi @Ulanbek,
Thanks for your it is working as expected. Can you please provide us the API for the downloading enrollment(Trackedentityattributevalue) field file.
As I remember you can’t create a FILE_RESOURCE type TEA and I never seen such API point
Hi @Ulanbek ,
There is option available to upload files for TEA from capture app. Please find the below screen shots for your reference .But can’ t able to find the download api. when i click on the uploaded link the file also getting downloaded from second screen shot(it is generating the href (blob:http://myserveraddress.com/c4484fca-7a1e-4a66-82c1-f10036309014) on ui side).
Hi @Ulanbek,
can you please update me on this. waiting for your reply on this.
I couldn’t create a FILE resource type TEA in the profile part.
@Ramesh_Reddy the Tracker Capture app doesn’t allow upload files on the Profile part. But Capture app does.
Therefore here is the API point for your file resources …/api/fileResources POST method.
I believe the rest you can manage
Good luck
Hi @Ulanbek ,
I have used the same api for uploading the file. I need file download api
I believe there is a bug in FILE type TEA.
In Tracker Capture app you can’t use FILE type TEA
But in Capture app you can use it, upload data
And if you upload data in the moment of TEI creation, there is no link to the uploaded file. But if you upload it after creating TEI, you will get a link
So basically your download link will be
blob:https://play.im.dhis2.org/file_identificator
But I couldn’t find any way to retrieve file from the TEI on api/trackedEntityInstances/TEI_UID/attribute_ID/data point
also check here File Uploads Tracked Entity Attributes - #7 by Ulanbek