From many days I have been working on AC-236.
The work is to add feature of capturing the photo of patients while registrations and uploading it to the server along with other details.
The problem is that I can’t able to upload any image by any means. I tried this link, I tried uploading it using code development by me, but no luck
Due to this problem, I’m not able to test my PR. Can anybody please look into this ?
API Doc: http://devtest04.openmrs.org:8080/openmrs/module/webservices/rest/apiDocs.htm#/personimage
What do you mean by no luck? Does it mean you get an error message? Or something else?
@dkayiwa, sorry. I should have attach some log file. I’m using this server: http://devtest04.openmrs.org:8080/openmrs/
This is the error I got when I tried to upload photo using Rest API documentation page : http://pastebin.com/wsptSwjF I wrote uuid in the corresponding field and base64 encoded image ( I got the encoded image using some online converter) and got the above error.
This is the error I got when I tried using android app: http://pastebin.com/cTeLjYrA Here is the PR .
As for javax.imageio.IIOException: Invalid argument to native JPEGImageWriter writeImage, you JDK may not support JPEG. You could try a different one.
@dkayiwa, as you suggested in telegram, I installed openmrs-standalone and tried. I was able to upload photo but I wasn’t able to download it, even using the Rest API doc page this error: http://pastebin.com/WMnPiG5U
And when I tried from the app, I got 404 error.
Object with given uuid doesn’t exist [null] means you trying to fetch what does not exist.
@shivtej Take a look at my github comments
@dkayiwa, @adamg, I can’t able to update the patient photo. I’m getting internal server error.
Here are the steps, I’m following:
- I create a patient with his photo taken. I have verified that the photo has uploaded in server. ( using this url: http://devtest04.openmrs.org:8080/openmrs/ws/rest/v1/personimage/some-person-url)
- I try to update the patient photo using
test rest api
page, getting internal server error. - After the failed attempt, I’m not able to see the first photo I uploaded using the url specified in point 1.
Here is error log: http://pastebin.com/PjkizEhM
I tried from both the places, test rest api
page and rest doc
page, getting same error.
@shivtej I have made PR to your repo here https://github.com/shivtej1505/openmrs-contrib-android-client/pull/1 with fixes