Celso
(Celso De Carvalho)
31 March 2023 08:20
1
Morning. In Tracker Capture app, the fileresources/imageId
object response is used to fetch images on trackedEntityInstances/teiId/attributeId
? I’m only doing get to trackedEntityInstances/teiId/attributeId
cuz I don’t see any required fileresources/imageId
object on payloud. But my image comes broken from the request.
This is the error i’m facing, the image comes broken.
2 Likes
Gassim
(AL-Gassim Sharaf Addin)
31 March 2023 12:49
2
Hi @Celso
Welcome to the community!
Please try to add ‘image’ to the request url: trackedEntityInstances/teiId/attributeId/image
Hope this solves the issue!
Celso
(Celso De Carvalho)
30 June 2023 22:00
3
Hi @Gassim
I made a mistake on my post above. I used trackedEntityInstances/teiId/attributeId/image
and not trackedEntityInstances/teiId/attributeId
as I wrote.
I had a solution but it was only using axios.
await axios({ method: 'GET', url:
{baseUrl}/api/trackedEntityInstances/${teiId}/${attribute.imageAttributeId}/image?dimension=MEDIUM, responseType: 'blob', headers: { Authorization:
Basic ${btoa(${username}:${password}
)}`, ‘Content-Type’: ‘application/json’ } }).
So I had the images loading without breaking. Thats fixed my problem. Thanks
2 Likes
Gassim
(AL-Gassim Sharaf Addin)
6 February 2024 15:54
4
Hi @Celso
Thank you for sharing the solution!