Can't able to add person image

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 :frowning: Due to this problem, I’m not able to test my PR. Can anybody please look into this ? API Doc:

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:

This is the error I got when I tried to upload photo using Rest API documentation page : 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: 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:

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 :slight_smile:

@dkayiwa, @adamg, I can’t able to update the patient photo. I’m getting internal server error.

Here are the steps, I’m following:

  1. I create a patient with his photo taken. I have verified that the photo has uploaded in server. ( using this url:
  2. I try to update the patient photo using test rest api page, getting internal server error.
  3. 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:

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 with fixes :slight_smile: