atom feed3 messages in org.apache.incubator.isis-usersFW: RO web service with image string ...
FromSent OnAttachments
Cesar LugoNov 24, 2015 12:08 pm 
Willie Loyd TandinganNov 25, 2015 9:43 am 
Cesar LugoNov 25, 2015 3:52 pm 
Subject:FW: RO web service with image string property
From:Cesar Lugo (
Date:Nov 24, 2015 12:08:47 pm


I am trying to display an image in a JavaScript client app, the image comes from
an Isis RO web service as a string, but it won't show, just shows like a broken
image. I found out that the format to properly display an image in HTML (<img>)
is in a base64 format like this example:

"data:image/jpeg;base64,/9j//4AAQSkZJRgABAQEAlgCWAAD/ ...."

but the JSON message has the image as a string in this format:

"Tacos.jpg:image/jpeg:/9j//4AAQSkZJRgABAQEAlgCWAAD/ ...."

so, for testing purposes, I saved a copy of the JSON message and published it in
a web server, changing the string to match the base64 format shown above in the
JSON file, then posted a GET to that JSON file. When I did that and read the
JSON message, it worked just fine, displaying the image in my JavaScript client

Do you know if there is anything I should do to change the message, or the way
JDO stores the property so it matches the base64 format?