FilePath control is used for binary uploads of files. It'll not return or set base64 anywhere. Subsequent activity/page submit is used to upload file to server. You can call pxUploadFile activity to get uploaded file data into Primary-pyUploadedFile page and from there decide how to persist on server.
This seems more ideal. However, I tried this but I'm unable to get the image to display in the section.
Should the property contain the entire data URI of the encoded image? Or just the base64 string? Just the string isn't working for me. The entire data URI works fine though but looks like it needs to be generated?
I have got the base 64 encoded string. Now i am using image control keeping property as the source. In the property i have stored the entire string i.e. data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4RDcRXhpZgAATU0AKgAAAAgABAE7AAIAAAAGAAAISodpAAQAAAABAAAIUJydAAEAAAAMAAAQyOocAAcAAAgMAAAAPgAAAAAc6gAAAAgAAAAAAAA
Use label instead of image control and use this <img broder=0 src="data:image/png;base64, <pega:reference name=".PropertyName" />" width =500 height= 500/> I have achieved this. Please refer below image for reference. Hope this helps:)