Hi guys, I am fairly new to the forum, so I apologize if my question is a lacking in the necessary details or doesn’t follow a standard format. Recently in an implementation we are running in Nepal, we were requested to add a picture in the person contact form. We have attempted and successfully managed to use images in app forms before and tried the same thing in the person_create contact form, which did not work as expected.
So the crux of the issue can be explained as a two-parter.
First off is the couchdb document when saving the contact. It does not have the
_attachment field like the form data which you can see in the images below (App form document is on the left with
_attachments and Contact form is on the right).
Both of the forms have used the type image in the the form and have no difference among them in terms of configurations and such. Both documents have the image names in the appropriate fields the
_attachments field is the only difference.
Secondly, when I inspect the page and look into the image loaded in the report, it loads the image as a blob and does not directly reference the image file. Where does CHT store the images uploaded via forms? I was hoping I could directly reference the file location in the
contact-summary.templated.js file and make it work that way but that does not seem to be an option.
TLDR; Trying to add image upload to person_create contact form is not working but the same thing works in app forms. How can images be uploaded to contacts so that they can be displayed in contact cards?